Would I give HomePod a home?

By Peng Xie

apple-homepod

Apple’s highly anticipated speaker is finally released after a few months of delay. I happen to be in the market for some new speakers. Would I give HomePod a home then?

The good

When it comes to speaker shopping, sound and build qualities are two most important aspects I care about. Being an Apple product, HomePod obviously inherited the same beautiful, high quality design from the family. And as a speaker, HomePod does not disappoint either. After some complicated measurements, a Reddit user on r/audiophile claimed that HomePod is “100% an Audiophile grade speaker.” The review has been picked up by multiple publishers as well as Apple’s Senior VP, Phil Schiller. Although later on the measurements were regarded as inconclusive after being examined by other Reddit users, HomePod did receive overwhelmingly positive comments on sound quality from reviewers. Personally, I’d like to see some scientific measurements and comparisons on HomePod against other high end speakers. Even if I decide to buy one, I still want to give it a listen myself if possible since sound quality can be subjective after all.

The bad

Now let’s put aside the Apple-colored glasses and check the HomePod from a “different” perspective. First, anyone who is considering getting a HomePod should know you’re buying into Apple’s ecosystem if you’re not already in it. Though it may simplify the setup procedures, keep in mind HomePod would only stream from your own iTunes library via AirPlay or Apple Music which is a paid subscription. No Spotify, Amazon Music or Audible.

What is more (worse?), HomePod doesn’t support Bluetooth either. So if you don’t have any device that supports AirPlay, HomePod is pretty much unusable. And a big NO-NO for me is that HomePod doesn’t have any wired audio inputs for more traditional devices like a turntable.

The least of my concerns on HomePod is the aspect of being a smart speaker. But this may very well be as important as sound quality to me to other potential buyers. If you have any experience with Amazon Echo’s Alexa or Google Home, you may find Siri on HomePod pretty basic. It can’t learn new skills and some features won’t be available if the paired iPhone is not nearby. So, don’t get your hope up.

And the ugly

Warning: HomePod ruins furnitures!

This is literally “ugly”. Multiple sources have reported that HomePod will leave a white ring on certain wood surfaces. Apple acknowledges this situation and suggests that the ring will fade or can be cleaned using “manufacturer’s suggested oiling method.”

Okay, whatever you say Apple.

Conclusion

You may already be able to guess that I won’t be getting the HomePod. Well, at least not now. I have a first generation Amazon Echo at home and recently bought a Echo Dot to use in a different room. None of them are particularly smart and Alexa still has problem differentiating my Philip Hue lights and scenes if they have similar names. For sound quality and usability I think traditional speakers and amp setup can still run rings around HomePod for same amount of money. Apple made some pretty impressive speakers and headphones before, so I have confidence in the future of HomePod. It’s just not for most people at the moment.

Advertisements

Kotlin: A Learning Process

By Xinye Ji

For those who aren’t in Android development circles, Kotlin has been on the rise since its beta release in 2011. At Google I/O 2017, Kotlin was announced to be officially support and adaptation of the language has soared in the last year. I recently decided pick up the language and hope to implement the upcoming features in our products with Kotlin.

Obviously, switching to a new language always has its hurdles. Syntactically, things always take a while before you get into a groove, but that’s always a part of the expected learning curve.

One of the main benefits of Kotlin over Java is that Kotlin seems to value making code a little more condensed. For developers who aren’t particularly fond of Java’s particularly verbose nature, I think this is a welcome change. There aren’t any massive paradigm shifts, but many smaller changes add up to a more streamlined development experience.

But aside from these mostly aesthetic changes, Kotlin takes many design cues from Joshua Bloch’s Effective Java. For me, this had some mixed results. Some of my lazier programming practices cropped up, resulting in me rethinking and revisiting my thought process when implementing some features in my sandbox app.

Thankfully because Kotlin is developed by the same company that produces Android Studio, a lot of these things are pointed out by the IDE itself. For example, my biggest lazy habit was not considering mutability. In Kotlin, one has to declare their variables as mutable or immutable with var or val respectively. If Android Studio, (or rather Intellij) detects that something you have declared is not changed after you’ve created it, it’ll flag that line and suggest you change the it to immutable. If I had to encapsulate a lot of Kotlin’s language design decisions, I’d say that it almost forces you to make better architectural decisions by employing an opt-out mentality, rather than an opt-in mentality.

Overall, I think this makes the learning curve more difficult, as it can produce unexpected behaviors if you haven’t read all the documentation surrounding certain features in Kotlin. But in the long run, I think this will lead to higher levels of productivity.

On a more personal note, I don’t think I have any particular preference towards Java or Kotlin yet. However, I’ve been working with mostly Java for the past few years, so there are still many things I’m still learning about Kotlin as I play around with it more. So one should consider that my familiarity with both languages are definitely not equal. In general, I’d say that (at the very least) trying Kotlin is a worthwhile endeavor for any native Android developer.

Apple Special Event 2017

Apple Special Event 2017: A New Hope?

By Peng Xie

apple-event-2017-september-logo-610x659

(Originally written on Sep 19, 2017)

Last week, the Cupertino company opened the door of its new campus to guests with a special event led by a touching and inspiring tribute to Steve Jobs in the theater named after him. During the 2-hour keynote, CEO Tim Cook along with other familiar faces presented the world a fleet of next-gen Apple devices that immediately captured headlines of all major tech websites and publications regardless the leaks and speculations happened before the event. So, what does this special event mean for Apple and tech industry? And more importantly, what does it mean for us, the consumers?

In my opinion, this special event is the most important events for Apple in years. When Steve Jobs introduced the original iPhone and App Store, Apple virtually changed the whole smartphone industry and turned itself from a computer and music player manufacture into a leader in mobile devices, software and retail industries. Since then, even though there were still good yearly updates and new(ish) product releases from Apple, I felt a trend of slowing down…. until this year’s special event.

(I’ll be discussing the new products from the special event in the order of how I remembered them and how important I think they are, so pardon me if it is different from the order of how they were introduced.)

Apple Watch Series 3

Starting with Apple Watch Series 3, while mostly left unchanged in term of design, more powerful internals and the addition of LTE are definitely welcoming improvements. This is nothing new since there are already other Android Wear devices that have LTE capability. And given that the new Apple Watch’s LTE will only work in the country where it is purchased, I think Apple will continue to try to win over customers with the refinement of the Apple Watches instead of features. The thing that interests me most in the LTE Apple Watches is actually the internal SIM card. Apple is an active player in pushing new SIM card standard and has used similar technology in previous iPad models. I’d like to see Apple put this technology in future devices and make it another industrial standard just like what Apple did with micro and nano SIM cards in previous iPhone models. Telecom companies would welcome this feature since it can reduce cost of making SIM cards while give better control on devices activated on their networks. However, for consumers, an internal SIM card may not be preferred by some. Using a local SIM card while traveling will no longer be as easy as swap out SIM cards. To utilize the full benefit of an internal SIM card, phone manufactures and service providers should really come up with ways to streamline the activation experience for customers.

Apple TV 4K

Next one is Apple TV 4K. While the device itself is more like a catching up with other streaming devices to some people (Personally, I love tvOS and I think Apple TV has huge potentials.), the real exciting news is that Apple is making quality 4K contents more accessible than ever. Years ago, a format war between Blu-ray and HD-DVD backed by multiple big companies and studios like Sony and Warner Bros. made HD contents widely available to general publics. But today, even with the popularity of 4K TVs and YouTube videos, we rarely see 4K movies sold online or in stores. With Apple upgrading the movies in iTunes Store to 4K without raising the price, I believe other retailers and content providers will soon step up their games in 4K, which will in turn benefit consumers greatly with not only increased availability but (hopefully) also reduced cost of contents and devices.

iPhone 8 and iPhone X

Last but not the least are the iPhones. The same “magic” formula used in iPhone 6 is still being used in iPhone 8/8 Plus while Apple “revolutionized” the smartphone design with iPhone X. Funny enough the stunning glass back design on both iPhone 8 and the 10-year anniversary iPhone X is actually a throwback to iPhone 4 instead of the original iPhone. But this I think it is mostly due to the newly added wireless charging feature. The iPhones are using an older Qi standard so I don’t think there’s much to discuss on that. What’s most important to me is the heart of the new iPhones, the A11 Bionic chip. In an interview after the event, Apple’s marketing chief Phil Schiller said Apple started development of A11 chip 3 years ago when A8 chip was shipped with iPhone 6. The focus on graphics and neural networks processing in the design of A11 Bionic chip can give us a glimpse into Apple’s ambitions. Along with the introduction of ARKit and Core ML in iOS 11, Apple is obviously venturing into a future of augment reality and machine learning.

This is more or less a trend in the industry, but not all companies have the expertise across design, manufacturing and software development like Apple does. The Verge reported that the “notch” on iPhone X is as complex as a Microsoft Kinect. Packing all those components in an area that small is simply amazing. Paired with the powerful A11 chip, it will surely give iPhone X the ability to raise the bar for facial recognition technology. In addition, FaceID, AR and other processes will be great help in training Apple’s machine learning algorithm. A more intelligent device can significantly improve user experience with the help of Core ML framework.

Aside from all the praises, there are concerns over the brand new iPhone X. The “notch” design is not loved by all. The security of FaceID is yet to be tested by the public. And unsurprisingly there are privacy concerns regarding to the FaceID feature. To me, those are all valid concerns and healthy discussions. Not only Apple, but all manufactures and consumers should know what they’re dealing with and getting into. I’d like to see the big players like Apple, Google and Samsung work together to come up with an industrial standard to ensure the devices meet minimum security and privacy requirements.

Still a leader?

I believe the answer is positive. With a 50% sales growth, Apple replaced Rolex as the biggest watchmaker in the world. And the tech giant is now championing for a future of 4K contents. Even though iPhone 8/8 Plus mostly remain unchanged and iPhone X’s minimum bezel design is not a first in the industry, Apple will still be able to influence the design language for future smartphones. When we look back in a future of augment reality and devices with outstanding learning capabilities, I think we would all agree that this year’s Apple Special Event is as significant as the one where Steve Jobs introduced us to a legendary device called iPhone.

Here’s to the next 10 years!

WWDC 17: Why am I excited as a developer?

By Peng Xie
wwdc17-og

WWDC 17: Why am I excited as a developer?

It’s been a week since WWDC and I finally got time to write this blog post to express my excitement as an iOS developer. I won’t be talking about the keynote, since it’s pretty much the same every year. Instead, I’ll be focusing on the real deal, WWDC 2017 Platforms State of the Union.

For the non-iOS-developer readers, Platforms State of the Union is a session in WWDC that gives attendees a more technical overview of what’s coming to Apple’s platforms, as its name suggests. Just like previous years, Apple made some really big announcements to its developer community. Let’s see some of my personal favorites.

Xcode 9 Source Editor

As an iOS developer, I use Xcode everyday, which sometimes can be a pain. Xcode’s performance and features are not that strong comparing to some of the competitors. This year, Apple introduced one of the most welcoming changes to Xcode in my opinion – they have re-written the whole source editor from ground up in Swift! The result? 3x faster file opening seed, 60fps scrolling and up to 50x faster jump-to-line action. On top of that, they also implemented an integrated markdown editor, improved coding issue presentation and tokenized editing. What’s even better? A brand new refactoring engine and workflow that is powered by an open-source transformation engine. IntelliJ users may not be that impressed with these improvements. But to me, the all new source editor will give me a huge boost in productivity. I can’t wait for it to come out of beta… (Rule of thumb, don’t use beta Apple softwares on production development works.)

Swift 4

Not surprisingly Swift 4 will be there with Xcode 9. Apple has vastly improved one of the most widely used classes in Swift, String class. In Swift 4, String is now a range-replaceable bi-directional connection, meaning it behaves and can be used like an array of characters now without any sort of conversions. Thanks to the underlying improvements, String now provides 2.5x-3.5x faster processing depend on the language it’s in. Another welcoming news is the introduction of “codable” type. The new type will be synthesized by compiler and has the ability to perform 100% type-safe JSON encode/decode with only one line of code. Apple also made it easier to adopt Swift 4 in Xcode 9. The compiler now supports both Swift 3.2 and 4.0 and allows developer to mix-and-match 3.2 and 4.0 targets. All these improvements makes Xcode 40% faster building large mix-and-match Swift/Objective-C projects. Moreover, building projects using multiple Whole Module Optimization targets is now 2x faster!

iOS 11

One of the biggest announcements in WWDC 17 is iOS 11. For users, iOS 11 blurs the line between a desktop and a mobile OS, which will finally make iPad Pro a viable productivity tool. For developers, this means new APIs to play with. Starting with the new Drag-and-Drop feature, Apple did a phenomenal job making it easier to integrate in apps. It’s automatic for text and web content, and has delegate protocols for customization similar to other iOS APIs. With its cross-process, system-wide multi-touch support and built-in data security, I’m sure developers will start to provide this new feature in their apps to users as soon as iOS 11 becomes available.

Good news for everyone

Along with Xcode 9, Swift 4 and iOS 11, Apple also introduced CoreML for machine learning, Metal2 graphic engine and ARKit for virtual reality. These are only a few that caught my eyes. I am really excited to learn more about CoreML and hopefully can put it to use in one of our apps someday. I truly think Apple has given us developers really good tools and platforms to provide users best features and experiences. This is good news to developers as well as users. A better Apple will surely push its competitors to step up their game, which is something I really like to see. Whether or not you’re a developer or iOS/macOS user, you should be excited too. As consumers, we will always benefit from the competitions.

It’s the “Spirit of Cogent”!

By Ganpy

I am not sure why it took 9.5 years to publish this on this or any blog, but somehow there was this assumption that this was already shared.

This was written about 9.5 years ago. These words were also set to tune at that time and the song was released during our first Cogent Day celebrations held in Jan, 2008.

This anthem of sorts captures the essence of what defines the Spirit of Cogent.

It outlines how Cogenters strive towards quality in their work and highlights how Cogenters’ main competitors are themselves, as they try to outdo themselves every single time. Overall, this song brings out the 3C Principle that is at the center of Cogent.

Enjoy!

Spirit of Cogent

Crackling sounds could distort one’s views
Our simple thoughts will fend off those noises
Instigating our desires
To outperform ourselves

Integrating all together
It’s the Spirit of Cogent!

Traveling borders and beaches
As a lantern for clarity
Working in bonhomie
Blooming creativity

Integrating all together
It’s the Spirit of Cogent!

Get to know “Markdown”

By Peng Xie

Markdown-mark.svg_-1024x630
What is Markdown?

Markdown is a lightweight markup language that is natural to write and easy to convert to rich text and other formats such as HTML or PDF. Because of its simplicity and portability, it has become the go-to option for developers to document their codes and README files. Find a random repository on GitHub, you’re likely to see at least one file in it written in Markdown. In addition to developer communities, Markdown is also supported in a variety of other places such as blogs and forums. Even some instant messaging apps now have Markdown-inspired formatting features.

Markdown in GitHub

As one of the most popular places where people use Markdown extensively, GitHub actually has its own version of Markdown syntax which is called GitHub Flavored Markdown (GFM for short). Being a Git hosting service, GitHub uses GFM to provide users additional features such as the ability to reference issues, pull requests and SHA-1 hashes of commits.

Markdown in WordPress

WordPress supports Markdown as well but you have to enable it first in your blogs settings. In Settings under Configure section of the side menu, you can turn on Markdown support for composing in the Writing tab and for comments in the Discussion tab. After saving the settings, you can start to write your new blog posts in WordPress using Markdown. As a matter of fact, this whole blog post is written in Markdown!

Time to play?

Now that you know more about Markdown, let’s see some examples!

Codes

You can either put your code inline like this or add a code block in your file like what I’m going to show you below.

This is a code block!

The syntax for inline code is to wrap your code inside a pair of `.
To use a code block, simply put ``` at the lines above and below your code block.

Links

[link to Google](https://google.com)
will be rendered by a Markdown viewer as
link to Google

Lists

* Unordered list item 1
* Unordered list item 2

1. Ordered list item 1
2. Ordered list item 2

The code block above will be rendered as:
* Unordered list item 1
* Unordered list item 2

  1. Ordered list item 1
  2. Ordered list item 2

That’s just a few simple examples of Markdown. There are many other ways and styles to write in Markdown. If you are interested, you can checkout GitHub’s guide on Markdown and the Markdown support page for WordPress.

Also, checkout this awesome post on Ray Wenderlich for some recommendations on Markdown editors for MacOS.

Bonus

Hey, thanks for reading this blog post! Here’s a bonus section for you! Do you know that you can make presentation slides using Markdown as well? I found an interesting presentation writer on GitHub called Marp. Just separate your slides with --- between empty lines and you can literally write a whole presentation using Markdown in a single file!

Android App Permissions

By Xinye Ji

app-permissions

Privacy on the internet has always been tricky. For some people, privacy is of the utmost important, they refrain from using any sort of online service that can aggregate information. (Like Facebook, Twitter, etc.)

On the other hand, many are oblivious to the issue, unaware that many phone apps ask for very intrusive permissions that most likely compromises your privacy. So in this blog post, I’ll be going over the Android permissions and what to think when apps ask to do certain things.

So in Android, there are nine major permission groups that developers can request when you’re running your app:

  1. Calendar
  2. Camera
  3. Contacts
  4. Location
  5. Microphone
  6. Phone (calls)
  7. Sensors
  8. SMS
  9. Storage

Calendar:

This permission is pretty self-explanatory. Applications that need to create meetings, calls, appointments or anything else that you’d like to plan need this permission to write to your phone’s calendar. (like a calendar app, go figure)

Aside from calendar apps, I’m not entirely sure other apps would need this permission. A red flag would definitely go up for me in that scenario.

Camera:

This is also a straightforward permission. If your app needs to use a camera, it needs to ask for the permission. A red flag would be if you can’t think of a scenario where the app needs to use your camera.

Contacts:

Typically this is with paired with the phone (call) permission. I would personally be very weary about this permission, as many services, such as Facebook, have a tendency to upload your contacts to the cloud when you enable this permission.

Location:

I am also pretty weary about this permission. With the exception of apps like Google Maps, there are very few apps that I would trust with my location.

Microphone:

I think this is similar to the camera permission. Use some critical thinking. If there isn’t an obvious reason why the app would need to use your microphone, think twice about allowing the permission.

Phone (Calls):

Apps rarely need this permission, but if you enable it, it could allow apps to randomly dial other people! Make sure that you trust the apps that ask for this!

Sensors:

Now this permission is a bit tricky, as it varies from phone to phone. Basically this permission allows developers to access motion and environmental sensors. For example, this app uses the accelerometer to see if the phone is in free fall. Typically this permission is less sinister when it comes to protecting your personal information however, so I’m not sure what red flags could be thrown in this case.

SMS:

Similar to the phone call permission, this is a texting permission. If you’re not sure why the app would need to send text, it’s better to not allow it.

Storage:

This is probably one of the hardest permissions to gauge. Any time you need to save a photo or a file of some sort, apps need to ask for this permission. However, this could also allow apps to snoop in your system files and do other questionable things with your information! Unfortunately, many many apps require this permission, so it is quite hard to tell who to trust. My advice would be to make sure that the companies behind these apps are trustworthy.

A Developer’s Responsibility

One of the odd things about software development and engineering is the discussion of ethics in the community. From the perspective of a developer, I would hope that users would give me all kinds of permissions to use on their phone so I can bring great features that hopefully improve their everyday lives. However, it is very easy to cross a line that people generally are not comfortable with for the sake of new technology. I believe that it is a developer’s responsibility to consider these ethical dilemmas.

However, the phone app industry is relatively new. These boundaries and ethics will most definitely be tested and defined in the future. In the meantime, I highly recommend everyone to consider their own privacy until then.