The day I got my DSLR, many years ago, I took a bunch of test shots having no clue what I was doing. One of those shots I have always considered my best photo, ever, even though it was totally random and lucky. As of yesterday, that shot has been replaced as my favorite shot ever, with an image I took with my iPhone 4S.
My coworker just found a neat easter egg on the new Google Company, Alphabet
go to abc.xyz and search for the word “drone”
Sergey and I are seriously in the business of starting new things. Alphabet will also include our X lab, which incubates new efforts like Wing, our drone delivery effort.
at the end of that sentence, click on the period
and see where it takes you…down the rabbit hole 😉
I’m working on an iOS app written entirely in Swift that uses the Google Analytics library. At Google I/O 2015 they announced full support for Swift and even CocoaPods (which doesn’t actually work if any of your other libraries use_frameworks! – but they are working on that and it’s not a trivial fix). The initial intro documentation from Google has options to show the code sample in either Objective-C or Swift, but all the rest of the documentation still seems to be Objective-C, only. I was listening to the More Than Just Code podcast tonight and Aaron Vegh was remarking on how going back to Swift code just wasn’t clicking, and he found it easier to just write stuff in Objective-C. So I thought, hey, until Google updates their docs, why not list some Swift code samples for how to implement various things in Swift.
Here I just want to look at a simple task: Event tracking in Google Analytics. Yes, this might seem trivial, but when you’re a developer switching back and forth between Objective-C and Swift, sometimes it’s nice if someone points out the syntax, as per Aaron’s comments.
Here’s the Objective-C code (adapted from the Google Docs, link above):
[tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"ui action" action:@"button press" label:@"do something" value:@1988] build]];
And here’s the Swift equivalent:
tracker.send(GAIDictionaryBuilder.createEventWithCategory("ui action", action: "button press", label: "do something", value: 1988).build() as [NSObject : AnyObject])
btw if anyone comes up with, or knows of, a nice plugin for WordPress to color code Swift appropriately, please let me know! 😛
I don’t always lug my DSLR around with me, but I almost always have my old iPhone 4S on hand. I’ve often commented at how amazed I am by the image quality from such an antiquated mobile device. Recently a friend was asking how I got my images to come out so great from the iPhone, so I thought I would share with everyone with a short blog post covering everything from taking the photo to post production on device.
- Camera (built-in iOS camera app) | alternatively, but I rarely use anymore: Camera+
- Photoshop Express (free!) | theoretical alternative would have been Lightroom mobile, but on my iPhone 4S it’s so slow it’s unusable, and I get most of the features I need from Photoshop
- totally optional – for posting/sharing, I use Instagram which I’ve further linked to auto-post to Facebook, Flickr, Twitter, Tumblr, and Foursquare. Yeah, sorry, all those friends who think I actually log into my Facebook account, think again.
Workflow: Taking the photo
This part is pretty straight forward – I just follow the rule of thirds as much as I can and I take a lot of photos – practice really makes a difference. Hold the device as steady as possible – the closer you are being a human tripod, the closer your images will be to being tack sharp. In contrast, any shake you introduce it going to blur your photos. Oh, and I cheat – I enable the grid on the camera display.
Basically the rule of thirds says to split up the scene by drawing two vertical and two horizontal lines. The four intersections of those lines are the points of interest – that is where you want to line up with the subject in your composition. In my case, when I’m taking a portrait I try to put one of the centers of the subject’s eye in one of those intersections. The worst thing you can do – and also what most people tend to do – is center the subject in the frame. That makes for the most boring of all possible photos. So, since most people take boring photos, following this simple rule will instantly raise the level of your photography (mobile or otherwise).
99% of the time these days I just use the built-in Camera app on my iPhone. I usually leave the HDR setting off, because taking HDR on my old phone takes more time, which allows much more opportunity for camera shake to be introduced. Also my style is to take candid photos, and that’s a lot harder to do if you have to ask the subject to stand perfectly still while your phone takes it’s time to snap the photo. I used to also use an app called Camera+ – it’s nice because it gives you a lot more manual control when you are taking the photo, but updates in iOS like being able to change the exposure just by dragging up on the screen (on that little sun icon next to the focus lock) has made using Camera+ unnecessary.
Workflow: Processing the photo (Photoshop Express)
Once I’ve taken the shot, I process it in Photoshop Express right on my iPhone. I use the manual settings and quickly apply a number of adjustments. Other than the last adjustment (noise reduction), these are in no particular order. With all adjustments, you want to be careful not to add too much, and just how much you adjust is something you need to figure out on your own over time. At the end I’ve included a screen capture video from the app to demonstrate the effect of each adjustment additively. The video was made from the app running on an iPad air – the main difference is the processor on the iPad is much faster and so there is less waiting.
- clarity – for objects, I increase this, for people / portraits I decrease.
- vibrance – increase for more color pop. At the extreme it will start to introduce a color shift and/or fringing so beware.
- shadows – reducing shadows brings out a surprising amount of additional detail in your photo. On portraits it removes shadows on the face (like under the eyes) which is usually quite flattering.
- highlights – I generally reduce these, especially after brightening up the photo overall with shadow reduction.
- sharpen – this makes the photo much more crisp. It also introduces noise, the more you sharpen the more noise you get; noise reduction helps compensate for that.
- The one adjustment I paid for, and I feel that it’s well worth it, is the Noise reduction filter. That is always the last adjustment that I apply.
Glory to the One who is Lord of all lords;
Glory to the One who facilitates all means;
Glory to the One whose throne is in the heavens, and in the earth is His authority ; glory to the One whom no creature of this life can see, and Whom no sense can perceive; and Whom description seekers cannot perceive; and Whom incidents do not change; and He does not fear His creatures
Oh Giver of refuge for those who seek refuge; Beloved of those who love; Hope of those who are cut off; Raiser of the fallen; The One who is with broken hearts;
Who answers the calls of the dejected; the Mercy of this life and the hereafter and the Compassion of both; Who answers the desires of those in need
Oh Allah, guide us by Your favor among those whom You have guided; and forgive us among those whom You have forgiven; and be our Protector among those whom You have protected; and bless us in all that You have given us; and save us and keep away from us any evil which You have decreed; verily You decree and none decrees besides what You decree; and none is abased whom You befriend; and none holds power whom You oppose.
Oh Allah, distance our sins from our obedience to You that will lead us to paradise; and indeed from certainty in faith comes difficulty in the life of this world
And bless us our hearing, and our sight, and our faculties, as long as You allow us to live; and make them protectors for us against the transgressions we have committed; and make us victorious over our enemies; and do not allow us to have problems in our deen; and do not allow us to make the life of this world our greatest concern; and remove from us difficulty in attaining knowledge; and do not make hellfire our destination; and make jannah our home; and do not impose upon us, because of our sins, people who lack mercy and do not fear You (as authorities over us)
Oh Allah, preserve us with steadfastness in Islam while we’re standing; and preserve us in Islam while we’re sitting; and preserve us in Islam while we’re sleeping
Oh Allah bless us with a pure life; and an easy death; and a return to You without grief and difficulty;
Oh Allah help us with our death; and with the grave and its punishment; and from slipping from the siraat; and the Day of Reckoning and its terror
Our Lord, You created us in the best of forms; and You granted us sustenance from Your bounty; and You taught us and gave us guidance; and then we disobeyed You openly, but You forgave us; and we committed sins, but You availed us from them; Your generosity has been descending upon us, yet we sin easily, and we are weak; if You look to our account then we indeed deserve punishment; but Your mercy is more expansive than our sins, so grant us Your mercy, oh the Most Merciful of those who show mercy
Oh Allah give us, and do not deprive us; and increase for us, and do not decrease us; and be generous to us, and do not be severe with us; and grace us, and do not disgrace us; and help us, and do not forsake us
Oh Allah, make white our faces (with light and give us our books on our right; and raise our degrees in status; and make our balances heavy (on the side of good and overlook our sins
Oh Allah, allow the month of Ramadan to be completed in Your pleasure; ; and with us attaining the success of entering Your garden
Oh our Lord, this holy month has indeed past; and we stand fearful and shaking before You; and we hope in You; accept from us, our Lord, our fasting ; and our standing in worship ; and our prayers; and our remembrance ; and all our deeds; and do not reject our deeds on the Day of Judgement, the Day of regret and shame
Oh our Hope when all doors are closed; and our Hope when all links are cut; and when there is a barrier between us and our family and our people (and we stand alone)
Oh Allah, forgive all the Muslims that have died who bore witness to Your oneness; and (who bore witness) to Your messenger with his message; and who died upon that
Oh Allah reward them and grant them goodness in the best way; and pardon and forgive their sins; so that they feel tranquility in their graves; and so that on the day of judgement they will be among the protected ones;
Oh Allah, move them from the narrowness of the grave and the insects, to everlasting jannah; with , comfort and vast shade
Oh Allah, grant us mercy when we reach where they have reached, under casket and soil, alone; oh Allah, grant us mercy when our families wash us; and mercy when they shroud us; and mercy when they carry us on their shoulders; and mercy when they lower us into our graves; and mercy when they throw on us dirt by Your mercy, oh the Most Merciful of those who show mercy
Oh Allah, bring down upon our graves the light of our fasting; and the light of our prayers ; and the light of our recitation of Qur’an
Oh Allah, forgive the Muslim men and the Muslim women; and the believing men and the believing women; those living and those dead; You are our Protector; Hearer, the Near, the One who answers our dua
Oh Allah, we ask You for all good ; the sooner of it and the later; what we know of it and what we don’t know; and we seek refuge in You from all evil; the sooner of it and the later; what we know of it and what we don’t know
Oh Allah, whatever You have distributed in this blessed night of health and well being, then make us,
Oh our Lord, among the fortunate who receive from this distribution; and whatever You have distributed in this night of trial , keep it from us and from the Muslims
Oh Allah strengthen Islam and the Muslims; and disgrace shirk and the mushrikeen; and smash the enemies of the deen
Oh Allah, our Lord, better the condition of the Muslims; oh Allah better the young of us; and better the old of us; and better the women of us; and make better the children of us; and our spouses
Oh Allah, save the necks of our fathers; and our mothers; and our brothers; and our sisters; and our paternal uncles; and our paternal aunts; and our maternal uncles; and our maternal aunts; and those who love us for Your sake; and those who love each other for Your sake; and those who lead us to good ; and those who facilitate good; and all the Muslims, oh Lord of the worlds
Oh Allah, help Your servants and the mujahideen in Your way in all places; Oh Allah help your worshippers in Chechnya; and in Bosnia; and in Palestine; and in Lebanon (Iraq, Sudan, Afghanistan, etc and in all other places
Oh Allah, make firm their feet; Oh Allah guide their aim; oh Allah, join them on the word of clear truth
Oh our Lord..
Overlook our sins when we reach The Gate and do not return us in disappointment
Oh Allah, accept our dua
Oh Allah, accept our dua
Oh Allah, accept our dua
and do not return us in disappointment; and do not deprive us from Your generosity that we seek; and do not return us deprived from Your blessings
Oh Allah, make us from amongst the fortunate who will attain the reward of laylatul qadr
Oh Allah, make us from amongst the fortunate who will attain the reward of laylatul qadr
Oh Allah, make us from amongst the fortunate who will attain the reward of laylatul qadr by Your mercy, oh the Most Merciful of those who show mercy
Oh our Lord, grant us good in this life, and good in the hereafter, and keep us from the punishment of the fire
Oh Allah, we seek refuge in You from Your displeasure; and we seek Your forgiveness, and we seek refuge in You from Your punishment
I cannot account for the praises that are due to You;
You are as You praise Yourself. And peace and blessings be upon the messenger Muhammad, and upon his family and companions.
Some quick notes on the WWDC 2015 session, What’s New in Web Development in Webkit and Safari Read More
Quick list of some interactive prototyping resources useful for iOS and other platforms:
- Invision (really easy & fast to use, let’s you deploy to both phones and web site)
- Design+Code (if you’re a Designer you can still prototype right from Xcode using Storyboards…let Meng To show you how)
A really nice insight following how Ash Furrow got into iOS development and contracting. I would urge any new aspiring iOS developers to read this. It’s a lot easier than you might think to get started. I think some important take-away lessons are:
- scratch your own itch – think of a simple app idea that solves a real world problem (even minor) that you have, and
- build your ideas – it’s better to get started and start building stuff, rather than just ‘book learn’ all the time and never actually try building something on your own. Yes, you will make mistakes. That’s the whole point – by building, we make mistakes. By making mistakes, we learn. If you don’t build, you never really learn.
- iterate – go back and improve after you learn from your mistakes.
I’ve been through a lot of iOS interviews. One of the first and frequent questions that comes up is, ‘what apps do you have on the (public) app store?’ I’ve also learned, from working on large enterprise iOS apps that were already on the app store when I joined the project, that some really crappy stuff can make it onto the app store. i.e., it’s a lot easier to get your app on the store than you might think. So don’t be afraid to try. Remember, you can always go back and improve on it – this is a learning experience, after all. If you’re just starting out, don’t worry about making the best app out there or making it super polished (to the point that you never actually ship, anyway). Just get it out there, maybe even for free and not worry about making any money off it. This is just an exercise for you. The ROI might come in a job or a contract later on – not necessarily from any sales on the app store.
Also by keeping your initial app ideas limited to very simple / limited scope, you have a better chance of actually completing the app. Going through the submission and acceptance on the app store, is a learning experience in itself – so don’t focus on just making stuff run locally and never ship anything.
As Seth Godin says, lots of people have great ideas, but few ever actually execute on them.
I crashed while cycling recently and shattered my scapula, fractured elbow, and tore up my arm from the elbow down the forearm. I’m not allowed to drive but, while I’m typing one-handed I can still work, if only remotely for now. I haven’t taken any pain meds although they prescribed some pretty strong ones. A friend pointed out though that U2 singer Bono had a similar crash. He received all the same injuries, and more, and his seem a lot worse than mine. All in all, I see plenty of blessings in my accident.