Clock Points — Swift Playground

Another Quick Exercise

For my birthday, I decided to solve a display exercise in Swift that inevitably will be necessary in my personal Towne of Klock project. The problem is very simple:

Given a 2D cartesian plane (in this case a SpriteKit Scene in Swift) determine where the points for One O’Clock through Twelve O’Clock must be placed. Not a very original or difficult problem to solve, per say. However, I do so love playing with geometry!

If interested in my solution you can do one of the following…

screen-shot-2016-10-31-at-4-09-29-pm

Continue reading

Bookmark and Share

iOS GameKit (Swift) Controller

A Leisurely Evening Exercise

Tonight I decided to Explore SpriteKit. I decided a quick project would be to create a simple touch controller (using a gamepad control stick as a metaphor). I drew most of the inspiration for this project from the iOS Chrono Trigger port which I always enjoyed.

Continue reading

Bookmark and Share

Inspecting Headers with Objective-C

Occasionally, an iOS app may to need to parse the headers out of an HTTP request. Here is one example to implement such behavior.

First consider the NSHTTPURLResponse Object:

<NSHTTPURLResponse: 0x79f4b7e0> 
{ 
    URL: http://zbeyer.com/stuff/mobile-testing/index.html 
} 
{ 
    status code: 200, 
    headers {
      "Accept-Ranges" = bytes;
      Age = 157;
      Connection = "Keep-Alive";
      "Content-Encoding" = gzip;
      "Content-Length" = 94;
      "Content-Type" = "text/html";
      Date = "Mon, 06 Jun 2016 21:20:29 GMT";
      "Last-Modified" = "Mon, 06 Jun 2016 18:36:03 GMT";
      Server = "nginx/1.10.1";
      Vary = "Accept-Encoding";
    } 
}

For this example, I am interested in the “Last Modified” header field on my sample index.html file. My application wants to know how long it’s been since that url was last updated.

Continue reading

Bookmark and Share

draw.io : The Best Free Flowchart Software

draw.io

Draw.io

Three to six months ago I found the flowchart software called draw.io. I have lauded it for it’s easy drag / drop behavior for generating rich flowcharts, schemes, and UI mocks. The application is designed to sync to a Google Drive (google doc api) account and offers all the fun sharing & collaboration features that I have come to expect from a cloud application. I have not had the opportunity to try out the Jira or Confluence integration yet–so I cannot give any advice or review there.

MVC Architecture

MVC Architecture

Diagrams generated can be exported in a variety of image formats (JPG, PNG, etc), SVG, XML and PDF (which I haven’t tried or found a use for yet), or HTML–which generates a static webpage that can be used on desktop browsers (see the following examples):

sample flowchart

sample flowchart

Sample Diagram

Sample Diagram

MCFTB - Play Strategy

MCFTB – Play Strategy

I love this tool.

Bookmark and Share

PhaserIO & TypeScript : A Hello CodePen

This quick pen duplicates the circle BitMapData computations from my previous Radial-Clock pen to four buttons that fill up a radial progress bar according to their color. I am picking up the syntax and style of writing web-apps in TypeScript.

See the Pen KDP -BASE (Phaserio, TypeScript) by Zachary Beyer (@Zbeyer) on CodePen.

Bookmark and Share

HTML / CSS References to Keep On Hand

HTML5 Doctor’s HTML5 Element Flowchart:

http://html5doctor.com/downloads/h5d-sectioning-flowchart.pdf

A visual flowchart to answer the ongoing question, “which HTML tag should wrap this content?” These simple rules will help keep code clean and easy to extend and digest by browsers and bots.

http://html5doctor.com/downloads/h5d-sectioning-flowchart.pdf

Learnlayout.com: Learn CSS Layout tutorial:

http://learnlayout.com/

This 19 part in-browser tutorial explains in depth the core CSS principals any web developer will need to grasp. Visual examples for each property help paint a rich picture and establish a strong foundation for styling page layout.

http://learnlayout.com/

W3Schools

Screen Shot 2016-04-27 at 9.10.48 AM

W3Schools has always been an excellent source of information across the board. From my early days learning PHP and Javascript in 2008 up through the present day, it is the most reliable and constant source of documentation I have found for all things pertaining to web development.

http://www.w3schools.com/html/default.asp

Bookmark and Share