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.

We Are Now A ‘Certified Minority Owned Business Enterprise’!


New MMSDC Logo.png

At Cogent Integrated Business Solutions Inc., we’ve always been proud about being a minority owned enterprise, and about showcasing our diversity wherever we go. After being in business for more than 10 years, we are very excited to share the news that Cogent has been certified as a Minority Owned Business Enterprise (MBE) by MMSDC, as of December 2016.

This certification definitely encourages us to expand our efforts in sharing our diversity, by establishing ourselves as partners with organizations committed to working with businesses like us, in order to benefit from our services. This certification also supports our efforts to expand employment opportunities and job security, to other minorities as well.

As an IT services provider, offering consultative and results-driven solutions in SAP technologies, as well as providing employee productivity/ engagement and smart enterprise mobility products; getting this certification is an accomplishment for Cogent. We hope to enter, expand and deliver our technological offerings to the city and state governments, and educational institutions. We are very confident that the public and not-for-profit organizations will benefit tremendously through our capabilities.

Affiliation with MMSDC is surely a great start for Cogent as this allows hundreds of corporations access us through the council. Also, in conjunction with this certification; Cogent has already initiated the process to get certified with Michigan’s HUB program, by becoming a member of the Small Business Association. These certifications will not only open doors for us to enter the public domain; but, as an established  SAP consulting and mobile product development company, we can now successfully deliver our solutions and services to a variety of clients and industries across Michigan, and continue to ensure we deliver the highest levels of service that will benefit the community as a whole.

On behalf of the Cogent team, here is a shout out to all the organizations out there open to collaborating with us, that, ‘we guarantee we will make you feel as happy, satisfied, and proud working with us; just like we feel about our products and services!’

A Faster Website – It’s not a need. It’s a must!

 

By Danny Kulas

Fast-Internet-stock-photo-2.jpg

More people than ever before are getting online and weaving the world wide web into their daily lives.  From delivering the news to selling that thing on Amazon that your customer will surely only use once, having a reliable website is critical when trying to convert users to loyal customers.  A reliable website is one that provides a great user experience and a fast exchange of information when someone is interacting with your website.  If you click a link, you expect to be taken to that new page in little-to-no-time flat.  In this article I will detail areas of improvement that will bring your website ‘up to speed’ and help you convert those window-shoppers to loyal customers.

Why Does It Matter?

Three seconds.  That is all the time it takes for someone to lose interest in your site and go elsewhere to find what they’re looking for.  You have three seconds to show the user what they want to see, otherwise, you can forget about converting them to a loyal customer.  “A faster website means a better visitor experience.  A slow website will lead to a poor user experience.  Your bounce rate will grow.  Page views will drop.  Most important, you will lost money (Demian Farnworth).”  “If an e-commerce site is making $100,000 per day, a 1 second page delay could potentially cost you $2.5 million in lost sales every year (Sean Work).”  That should resonate with anyone who runs an on-line business.  No one talks about a great experience they had on some website, but they will tell their friends and family about a poor experience they had so that they know to avoid it in the future.  This will only compound the trouble because now, even though Mrs. Smith was the one who had the poor experience, she will tell anyone who will listen and now you have a whole bunch of Mrs. Smiths who never came to your website in the first-place nor will they moving forward.  You’ve lost a customer before they even had a chance to check out your site.  Another reason why you should care about the speed of your website “is that Google now uses site speed data to help determine where to list your website in its search engine results (Fred Meyer).”  For companies who have small advertising budgets, the search results page of Google might very well be your best bet for getting your business and services noticed.  I can speak from experience, in that I rarely venture to the 2nd or 3rd page of Google search results.  So, if you want to get noticed, make sure you’re showing up on the first page of results (if possible).

What Can Be Done?

There are several technologies and techniques to consider when looking to improve the speed of your website.  A simple Google search of ‘Make my website faster’ will yield several dozen results.  Some questions you might want to consider are: Do you use a lot of images?  Are you loading several script files?  Is there dynamic content?  Are you compressing your assets?  Answering these questions (and others not mentioned above) will help assist you on what to do regarding the improvement of your website performance.  Being able to identify areas of improvement is a skill that takes a trained eye, so if you’re not sure what you’re looking for, grab someone from your development team, sit down with them and do a website audit to get a better sense of what you’ll be dealing with.

Fake It (Above the Fold)

A website loads from top-to-bottom, so, by placing the specific CSS rules that govern the look-and-feel of the top-half of your website in the head of your HTML document, it will seem as though the website is loading fast and without pause.  The content we’re targeting is often referred to as ‘Above the Fold’ content and it’s what shows up first when a website begins to display it’s page.  What this does is give the user something to look at while the rest of the site is busy loading.  It’s not the most elegant solution and may even feel a bit ‘hacky’  but when used properly it can be of tremendous help.  Perception isn’t always linked with reality and sometimes, especially in this case, that gives you an advantage when trying to deliver an optimal website experience to your users.

Minimize HTTP Requests

You’ve built a website.  It’s very likely you’ve accomplished that by employing the use of several static resources, such as images, CSS files, etc.  Whenever someone visits your website, these files need to be loaded into the browser so that the user can view what they came to see.  The more files your site requires in order to load, the longer time it will take to do so.  This is the scenario we want to avoid and it’s pretty easy to do so.  After you’ve built your website, you might realize that you have three different CSS files, for example.  Each file counts as an HTTP request, which adds time to the page-load speed.  By combining those three files into one, you will increase the speed at which your website loads.  This is called concatenation and can be one of your best friends for increasing site performance.

Pictures and Pixels

If your website requires images, make sure you’re using the best image for the job.  What that means is don’t use a high-resolution, 1200 x 1200 pixel image for a site icon which would be better served using a scaled-down version.  “On top of the extra download time, precious processing power and memory are used to resize high-resolution images (Johan Johansson).”  Whatever you do, make sure to avoid “use of scaling, especially from larger to smaller images.  The image result might look fine on screen but the file size will be the same.  To truly take advantage of the smaller dimensions, use an image editing program and scale the image accordingly (Nathan Segal).”

Cache! Cache! Cache!

“Browser-caching stores cached versions of static resources (such as images or CSS files, for example), a process that quickens page speed tremendously and reduces server lag.  When a user visits a page on your website, the cached version will usually be served unless it has changed since it was last cached; this saves a lot of [HTTP] requests to your server and as a result makes it [your website] faster (Morgan Davis).”  Caching is a great technique for improving your page-load speed, but keep in mind that “the thing with caching, though, is that in most cases it only works for repeat visitors.  First-time site visitors won’t have the site cached yet, since the page needs to load files at least once before it stores them (Laurence Bradford).”  There are two types of caching to be aware of and those are Broswer Caching and Server Caching.  “Browser caching allows your browser to store static files for a while, so it doesn’t need to retrieve them every time you visit the site (Daniel Pataki).”  In terms of server caching, “instead of processing every request, the server takes the results of the these requests and stores them.  It then serves these saved results instead – making everything much faster (Daniel Pataki).”  Learn the art of caching and let your website benefit from that knowledge!

Consider Using a CDN

CDN stands for Content Delivery Network.  “A CDN takes a website’s static files – such as CSS, images and JavaScript – and delivers them on servers that are close to the user’s physical location.  Because servers are closer to the user, they load more quickly.  Larger websites implement CDNs to make sure their visitors from around the world have as fast an experience as possible (Morgan Davis).”  While using a CDN is a great option, it’s also an expensive one.  Make sure your company needs a CDN before handing over the cash to implement one.

Conclusion

Website speed matters, tremendously, to your customers and your bottom line.  Don’t be foolish by ignoring it, otherwise you may be left scratching your head wondering why your monthly revenue keeps falling.  Take the time to audit your website, identify areas of improvement and employ the use of any of the options I detailed above.  Your customers will thank you.