Categories
Uncategorized

Patrick Stewart has only one rule for using Twitter

Sir Patrick Stewart has but one rule for using Twitter, and it’s a good one. In this video, he explains how he uses it, and how he came up with the rule.

This article also appears in The Adventures of Accordion Guy in the 21st Century.

Categories
Uncategorized

iOS Developer Roundup: New edition of The iOS Apprentice, Validated text fields, Typhoon dependency injection framework, and lots of algos in Obj-C

The iOS Apprentice: Second edition for iOS 7 and Xcode 5 now available!

what's in the iOS Apprentice

If you want to learn iOS development and need a little structure to help you get started, I strongly recommend RayWenderlich.com’s iOS Apprentice, a set of four excellent tutorials written by Matthijs Hollemans. Each tutorial walks you through the construction and completion of a full-functional iOS app. The tutorials are:

  1. Bullseye: A simple game app. Building it, you’ll learn about iOS’ UI controls and using them to get input from and present results to the user.
  2. Checklists: Learn how to make use of table views and store user data by building a “to-do list” app.
  3. MyLocations: Build a location-aware app, and learn more about iOS’ object model and Core Data.
  4. StoreSearch: An app that lets you search the iTunes Store for music. Along the way, you’ll learn how to write apps that call web services, support multiple languages, create pop-up detail screens, and build universal apps that run on both the iPhone and iPad.

RayWenderlich.com says that you don’t need any prior development experience to use these tutorials, but even a experienced developer will find them useful (you can just skip the basic programming parts, and there’ll still be a lot of info you can use). Each app builds on the lessons of the previous one. By the time you’re done building the final app, you should be able to write your own App Store-worthy apps. I can’t recommend the iOS Apprentice highly enough; I’ve found it so incredibly helpful as I learned iOS development.

The latest edition has been updated for iOS 7 and Xcode 5, and it spans over 900 pages. If you haven’t bought any of the previous editions, you can buy the iOS Apprentice for US$54, which entitles you to free updates. If you have bought an earlier edition, you can download it for free.

TSValidatedTextField: A text field that you can validate with regex patterns

tsvalidatedtextfield

TSValidatedTextField is a subclass of UITextField that lets you use an NSRegularExpression to specify valid and invalid input.

Typhoon: A dependency injection framework for Objective-C

typhoon

Dependency injection is a fancy-pants way of describing a design pattern that removes hard-coded dependencies on collaborating objects, making code that’s easier to modify, test, and update. You can do dependency injection on your own, but it’s much easier to use a framework. Typhoon is one such framework for Objective-C, it’s ready for us right now, and their site goes into greater detail on why you might want to use dependency injection and why you might want to use their particular framework.

All sorts of basic algorithms implemented in Objective-C

algorithms

And finally, if you want to see what you might have forgotten from your second-year algorithms class implemented in Objective-C, take a look at Evgeny Karkan’s EKAlgorithms. In this still-evolving GitHub repo, you’ll see these classic hits from computer science:

Array

  1. Index of maximum element in array.
  2. Find longest string in array of strings.
  3. Find shortest string in array of strings.
  4. Array reverse.
  5. Intersection of two arrays.
  6. Union of two arrays (with remove duplicates).
  7. Find duplicates.
  8. Array with N unique/not unique random objects.

Search

  1. Linear search.
  2. Binary search.

Sort

  1. Bubble sort.
  2. Shell sort.
  3. Merge sort.
  4. Quick sort.
  5. Insertion sort.

String

  1. Palindrome or not.
  2. String reverse.
  3. Words count.
  4. Permutations of string.
  5. Occurrences of each character (a – z).
  6. Count needles in a haystack.
  7. Random string.

Number

  1. Sieve of Eratosthenes.
  2. Great common divisor (GCD).
  3. Least common multiple (LCM).
  4. Factorial.
  5. Fibonacci numbers.
  6. Sum of digits.
  7. Binary to decimal conversion.
  8. Decimal to binary conversion.
  9. Fast exponentiation.

Data structures

  1. Stack (LIFO).
  2. Queue (FIFO).
  3. Deque.
  4. Linked list.
  5. Graph
    • DFS (depth-first search);
    • BFS (breadth-first search).
  6. Binary search tree (BST).
Categories
Uncategorized

Don’t laugh. A lot of software is patched in pretty much the same way.

pringles can repair

Click the photo to see the repair at full size.

Remember Weinberg’s Second Law:

If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.

Categories
Uncategorized

37signals’ comeback to that onerous Office 365 “#GetItDone” infographic

Yesterday, I posted the #GetItDone infographic produced as an ad for Office 365, which seemed to be aimed at CIOs, CTOs, and other tech decision-makers who wanted to squeeze free unpaid work from employees outside of office hours. I called it The saddest infographic in the land. Here’s a snippet:

get it done - small

37signals caught wind of this and create their response, a similar-looking infographic with the hashtag #WorkCanWait, which takes some well-aimed potshots at every info-nugget from the original. There’s even a feature that lets you create your own parody!

work can wait

It’s part of their promotion for their book on remote work, simply titled Remote:

remote

Categories
Uncategorized

The saddest infographic in the land

Titled as found. Thanks, Office 365. Thanks for nothing.

Now get back to work!

get it done

Thanks to Joe Murphy for the find!

Categories
Uncategorized

U.S. telcos don’t want your phone to have a theft-preventing “kill switch” because it cuts into their insurance business

this is a business model

The use of “kill switches” to prevent theft are nothing new. Many car stereo and amp units require a code to be usable after they’ve been disconnected from the battery, and you can buy switches that are either hidden or require a code that must be activated before the car can be started. Right now, you can remotely lock a stolen mobile device, but a thief can simply do a hard reset to wipe it clean, then use or sell it. What would help deter theft is a kill switch that would render the device unusable, even if a hard reset is performed.

New York- and San Francisco-based lawmakers  are trying to get mobile device vendors to implement such kill switches, but they’re facing opposition from that familiar obstacle: the carriers. San Francisco district attorney George Gascón, while working with Samsung on a kill switch agreement, says that carriers including AT&T, Verizon, T-Mobile, and Sprint, who have to approve pre-loaded software, have rejected the kill switch concept. Based on emails between a Samsung exec and a developer that he saw, he says that carriers fear that a theft deterrent like a kill switch would eat into the profits they make from selling anti-theft insurance. Nice.

The public argument that carriers make against kill switches is that a malicious third party could take control of the feature and use it to disable phones. They even brought up the spectre of disabling the phones of Defense officials or police officers. They also claim that deactivated phones couldn’t be subsequently reactivated if found, which isn’t true in the case of Apple’s “Activation Lock” feature.

This isn’t the first time that carriers have stood in the way of progress because it cut into their business. It wasn’t all that long ago that they made it difficult or inconvenient to put apps on phones, saying that they could be threats to the network. The success of the iPhone changed all that; what change would it take to get carriers on board with kill switches?

 

Categories
Uncategorized

Samsung Galaxy Gear: A “small green tomato” that sold 50,000 or 800,000 units, depending on whom you ask

samsung galaxy gear - small green tomatoes

Today’s numbers that show how well Samsung’s Galaxy Gear smartwatch have been doing have been all over the map. An early report in BusinessKorea declared the Gear a flop that sold only 50,000 units since its introduction in September, with daily sales of “800 – 900 units” in Korea. Samsung quickly responded with an announcement that it had sold 800,000 units, and that sales had exceeded their expectations. Later, the verb applied to those 800,000 nouns was tempered to shipped.

The Galaxy Gear is meant to be a peripheral device for a smartphone, connecting to it via Bluetooth LE. As with other smartwatches such as the Pebble, when wearing it, you can see notifications from your phone for email, text messages, incoming calls and so on without having to dig into your pocket or riffle through your bag for the device. Its use of Bluetooth LE means that it can only communicate with devices running Android 4.3, which currently are the Galaxy Note 3 and Galaxy Note 10.1 2014 Edition. Support for the current flagship phone, the Galaxy S4, will come when Android 4.3 comes to that phone.

Powered by a single-core Exynos system-on-a-chip running at 800MHz with 512MB of RAM, the Gear has about as much under the hood as a 2009/2010-era smartphone. Its display is a 227 pixel-per-inch 320 * 320 Super AMOLED touchscreen. Incorporated into the wristband are a 1.9 megapixel camera with back-illuminated sensor, a speaker, and two noise-cancelling microphones. It also has an accelerometer and a gyroscope. It’s an enticing platform for a mobile developer.

The Gear has received mostly poor reviews. The integration of components such as the camera, speaker, and microphones into the strap makes it rather stiff and uncomfortable to wear for some people. The notification system — one of the primary reasons the watch is worn — has been called inconsistent, although it’s said that software upgrades have fixed some of these problems. Battery life is short. Geek.com published a leaked report citing a 30% return rate for Galaxy Gears at Best Buy.

The Gear is another data point for my theory that Samsung are great at making things for which there’s an existing template or a long history that they can use as a guide — think TVs, monitors, washing machines, and many other products that bear a Samsung label. However, when they’re venturing into terra incognita — just think of every smartphone that came before the Galaxy S3 — they need help. As The Verge put it in their review of the Galaxy Gear:

As with industrial design, software engineering isn’t among Samsung’s strengths, and the results on the Gear are a painful mix of unreliability and inadequacy.

Samsung exec David Eun had this to say about the Gear at Business Insider’s Ignition conference:

“What we’re dealing with is small green tomatoes,” he said of the Gear’s first-generation growing pains. “And what we want to do is take care of them and work with them so they become big, red ripe tomatoes. And what you want to be sure of is that you don’t pluck the green tomato too early and you want to make sure that you don’t criticize a small green tomato for not being a big, red ripe tomato.”

In other words: Yes, it’s not ready for the market, but please blow $300 on it anyway! We’ll get it right eventually.