Category: Code

PHP7 Vagrant Box

I’m keeping a close eye (or as much as I can anyway) on PHP7 and what it means for the future of the language. Installing in your local dev machine is risky, especially if you have ongoing work. As usual, Vagrant comes to the rescue! Rasmus Lerdorf has put together a Vagrant box to ease in the setup and isolate your testing. If you use Atlas, check out the box here. Otherwise, the readme is available on Github

Mongular, a Content Delivery System

Mongular is something to keep a close eye on. We’ve had a number of projects at work where we might want something… other than a CMS. Where content is king and that content is decoupled from the system using or displaying it.  Other solutions that we’re excited about are Prismic and Contentful. Systems like this would let us do whatever we wanted with the site. Not being tied to the confines of a particular CMS’ way of doing things could be freeing. These systems offer much more powerful ways to relate…

Equality in the Apple Blogging Scene

Long time Mac developer, Daniel Jalkut posited a question last night on Twitter. I find it far easier to follow brilliant women on Twitter than in blogs. Do women in the Apple scene not blog as much, or am I missing them? — Daniel Jalkut (@danielpunkass) January 10, 2015 This question came out of some of the responses to Marco Arment’s “hot” post last week about the state of Apple’s software ecosystem. Daniel got a good number of replies. I’m always looking for more to read, especially technical blogs. I’ve…

Contributing to Magento2

The Magento2 dev team is now using Github in the traditional sense: They have an internal repo that gets pushed out to github at the end of their sprint. All commits stay intact. This is WAY better than the previous method of pushing a giant commit with everything each sprint. Ben has a good walkthrough on submitting a pull request to the repo. He links to a few resources to get up and running on the new platform.  Alan Kent goes into more detail on the “why” of the change. It’s not just code that has been…

Apple Pay and Magento

The Business of Apple Pay (Alec Simonson) On the outset, Apple Pay is very cool and could very well be the wave of the future. A lot of this hinges on “what’s under the hood” in terms of Apple’s contract with the leading credit card companies who helped with the development. If everything is open, and companies like Samsung can let their customers pay with NFC technology as well, I could see this as something that will be successful, adopted, and an example of Apple leading the way. However, if Apple goes…

A Tale of Two iPhones: Part 2

My iPhone decision, posted on The Tekside Network Size matters, and it’s all in how you use it. In my last post, I went through my thought process of picking a new phone. Since then, I’ve had a lot more hands on time with the 6 Plus, and came to a decision. Quick recap: Big screens are pretty, big screens are harder to fit in pockets, I read a lot, I should get a big one as a developer device. A coworker of mine has the 6 Plus and was gracious enough to let me use his for some lengths of time. We were both…

My Packing List

I’ve been traveling for work a bit this year.  Sometimes with little notice and it’s helped me to have a go to packing list.  I also use it for personal trips as well. I just need less things.  I was originally managing this in clear. Lately I’ve been managing it in Listacular. I like that this app syncs text file todo lists over dropbox. Easy to update on my Mac. Aftershave Air bed  Ball Bathing suit  Belt Big headphones Boots  Charge ipad  Charge kindle  Charge laptop  Coffee  Deodorant  Dress shirts…

A Tale of Two iPhones

I wrote up my thoughts on picking a new phone over on the Tekside Network. It’s almost upgrade time. Normally this is an easy decision: get the new phone. Apple threw us a curve ball this year by launching two entirely new phones. Now every Apple fan has a choice to make and it's a much, much harder choice than the 5s vs. the underpowered 5c last year.  This year’s choice boils down to screen size. Yes, granted, the 6 Plus has better battery life and a better camera. Those two things will influence the…

On Morning Rituals

Rituals are important. I’m a creature of habit. But, I had never characterized some of the things I do as rituals.  I read some posts by Casey Liss and David Smith that were not unlike some of the things I do.  I like repetition. I like not having to think about a decision or even make one to begin with.  Similar things for breakfast each day. If I cook a big meal I’ll have the leftovers for subsequent meals until they are gone. Having these rituals help me get my day going. They let me know that all is…

Podcast Reruns

Last year, I had been plowing through old episodes of a few Tech podcasts. I was able to get through all of Developing Perspective (they are short) and was working on Build and Analyze.  I’m halfway-ish through B&A, but my listening has died off in leu of new episodes of other shows. I’ve missed listening to it.  The reason it dropped of is playlist related. Everything I listen to is in one playlist that I prune from time to time. I didn’t add B&A to it because I didn’t want to have to download each episode…

“make” time

We’re often told you need to “make” time, a phrase that rankles me. Drives me nuts as well. Our days are already packed. "Making time" isn't making it; it's prioritizing time. If you make time for something, you are acknowledging that the thing you are making time for has a priority at the expense of something else. That’s why it’s important to know how long something takes, or to break it down into micro projects. By doing so, you may discover that you can reclaim time “might” by being more efficient, or…

UITableViewCell Action Swiping in iOS8 and Swift

Mail.app in iOS7 brought swiping cells to the inbox. The iOS8 beta added a 3rd button to it.  Apple has also introduced an API to assist with creating this effect: UITableViewRowAction. Prior to this, I used SWTableViewCell. Below is how to get the basic functionality working. Please note that you have to implement the 2nd function whether it has a body or not I can’t get the (-) delete indicator to appear when I put the table into edit mode though. Setting UITableViewCell.shouldIndentWhileEditing = NO is…

How to Restore a Time Machine Backup From a Synology NAS

My Sunday morning started off like this: “There’s an error with the EFI system partition’s file system.” Well today’s off to a great start // @siracusa — Tim Broder (@timothybroder) August 3, 2014 My laptop wouldn’t finish booting. All I got was a backlit, black, screen.  I went through numerous combinations of booting with option, cmd+R, cmd+shift+R, un-mounting, ejecting. In all methods, trying in vain to get the Disk Utility to verify and repair the hard drive. I tried from Recovery Mode and a fresh OSX…

Dismiss a Modal UIViewController created in Interface Builder

There are a number of posts on this subject on Stack. They involve re-instantiating (this seems slower to me) or yanking the view from a UIButton (this feels dirty). I’d rather just update the UIBarButtonItem that I already have: 2014-07-27_1826 All I needed to do, was attach the appropriate target and action to the UIBarButtonItem:

Using PonyDebugger on a device

PonyDebugger is awesome. I use it mostly for Core Data debugging. Most of the time, I find it easier then firing up SQLite Professional. When using the simulator, hitting localhost:9000 is fine. On a device, not so much; you need to hit your machine. xip.ioto the rescue! What it is: xip.io is a magic domain name that provides wildcard DNS for any IP address. We use this heavily at work if the machine we’re on isn’t hooked up to a subdomain or Vagrant Share. We can use this wildcard to have our iPhone hit…

UITapGestureRecognizer in Swift

I have a subclass of UIView that has a label: I want to attach a Tap Gesture to it:

Creating a conforming delegate (UITableViewDelegate) in Swift

This tripped me up for a bit so I hope this helps someone. I started out with this class, thinking I could just continue on my merry way. This errors in Xcode with: "class does not conform to NSObjectProtocol” Hmm ok, but much there yet, what did I miss? This should definitely be a class; not a protocol (I have methods to implement), not a @class_protocol (wrong use, based on the docs), hmm. This obviously behaves different than in objective-c. What is inherent in the obj-c version of this that would…

Why I turned off email notifications

Just about a week ago I had an epiphany: Email is a constant. It will never end. More often than not nothing is actionable I made a quick change — turn off all notifications for email. None shall pass. NO EMAIL NOTIFICATIONS. I've been doing this for about a year now on my phone and it's amazing. I've been doing it for 3 years on my laptop. I don't know why I didn't do it on all my devices sooner. (I don't get outlook or gmail notifications). It lowers stress and helps me focus on actual tasks instead of…

Coding Under Par

when it’s midnight and I’m on a perceived roll with some coding challenge, there doesn’t appear to be any stopping me. I “have all night,” or at least that’s what my monkey brain says. Of course, the smarter half of me knows I should be getting calling it a day and getting some much-needed rest. I hear this. As I get older, and keep to a rigid sleep schedule, I tend to find myself being useless after 9pm. I do miss the old days io burning through until 2am. Now that flux exists to take care of the circadian…

Looping through subviews and downcasting in Swift

I've been playing around with Auto-Layout. This snippet was helpful to see what constraints were set on what views in my View Hierarchy. Getting the downcast right on the subviews Array took a few tries: