Mobile
My iOS apps
Other apps
Open source
  • Bandwidth benchmark
  • RAVM virtual machine
  • Big integer division
  • Prime numbers
  • AntiJOP sanitizer
  • TouchWidgets UI lib
  • Networking utils
  • Documentation
  • x86 instructions ref
  • GIT quick ref
  • GPG quick ref
  • Avoid Ubuntu
  • Android malware risks
  • iOS malware risks
  • OS/X security tips
  • Tor blockers
  • Software engineering
  • BASH aliases
  • I.B. pro/con
  • Why 64-bit?
  • Nutrition
  • Blog
  • Contact
    1 at zsmith dot co

    An unassuming tech blog

    © by
    All rights reserved.

    A series of concisely expressed random observations organized in reverse chronological order.

    Safari not included with OS/X?

    Mar 2017

    On iOS, I can open Safari by saying Siri, open Safari. Such is not the case on MacOS. Siri disclaims any knowledge of Safari.

    If MacOS were free/open-source software, or a hobby project, this kind of obvious bug might be understandable. But it isn't written by volunteers. It's not a hobby project. What is wrong at Apple?

    How to fetch a file through TOR

    Feb 2017

    Steps:

    1. Run the TOR browser.
    2. On OS/X use this command: curl --socks5 127.0.0.1:9150 $url -o $name
    On GNU/Linux or Windows the port may be different.

    What does MacOS Sierra look like when its windows server malfunctions?

    Feb 2017

    MacOS sierra crash
    How did Apple screw up to even make this possible?

    Reminder: Even X-Windows never looked this bad.

    What did I do to cause it? It's my secret. Did I create an error ticket on Apple's website? Oh hello no. I've done that before; they always deflect my concerns and ignore my ample evidence.

    Ad Age: Apple losing its way.

    If Apple is against computers with touch screens...

    Feb 2017

    Why is it making this then?

    Are they taking a page from Magritte?

    The meaning of Magritte's painting is that the pedestrian observation that a word is not the thing. But in order to think, we need accurate words to describe a thing. If Apple makes a touch-screen computer but then says they don't believe in making touch-screen computers, what are they saying? What is the iPad with keyboard then really? A surveillance device? Without an SD card slot or a USB port, it certainly isn't a serious tool for businesses.

    Consumers want solutions to problems, not doublespeak. Their money is hard-earned. They are not idiots and you treat them like idiots at your peril.

    How to make a universal i.e. fat library for iOS

    January 2017

    Turns out, it's a simple command:

    lipo -create x86.a arm64.a ... -o universal.a
    

    Notice the pun. Lipo is the prefix for "fatty" e.g. liposuction, lipoprotein etc.

    Common QA mistakes

    November 2014

    Testing is, in a sense, like making a hamburger. It is not terribly difficult but it has to be done right.

    • As with making hamburgers, doing testing wrongly can result in a tragedy.
    • As with making hamburgers, some people should not be doing it.

    Some common mistakes:

    • Failing to report obvious bugs therefore letting bugs pass through to the customer.
    • Not reporting critical facts or circumstances about a defect e.g. that Wifi has to be on, that it only occurs right after midnight etc.
    • Not providing any evidence of a defect e.g. screenshot, videos taken with a phone, or log files.
    • Not being knowledgable enough about the product that you are testing to know how it is supposed to behave, leading to the response that is how it is supposed to work.
    • Not taking the effort to write down what happened at the moment when it happened. Instead trying to remember much later.
    • Not wanting to check everything that needs to be checked and/or not prioritizing.
    • Not testing the latest product. Wasting time testing code whose defects are already fixed.
    • Accepting second-hand information (hearsay or rumors or lies) as totally legitimate instead of speculative.
    Some red flag mistakes that may indicate you should not be working in QA:
    • Doing QA because you like to complain.
    • Turning QA into a political tool e.g. to criticize whomever you dislike this week.
    • Declaring that something doesn't work but refusing to say how or why or when.
    • Being opposed to learning a new platform in order to test software on that platform e.g. I don't do iOS. (Yes; I have heard that.)
    • Having a passive-aggressive personality.

    Management as a service job

    November 2014

    Human nature being what it is, many people enter management positions even though they don't understand people, therefore they suck at management. Or they don't understand themselves, therefore they suck at management. Why then would such people think they should manage?

    A few hypotheses:

    • He/she is bossy i.e. a micromanager, blamer or control freak.
    • He/she is lazy i.e. actual work is super-hard so they try to avoid it.
    • He/she is greedy i.e. they think management is the road to riches and therefore use it to climb the ladder. Example: Carly Fiorina.
    • He/she is classist i.e. they think they are above little-people work.

    Just as a wife beater should never be allowed to become a cop...
    Nor a compulsive liar a politician...
    Nor a kleptomaniac a banker...
    Nor a bully a lawyer...
    The person who has some/all of the above-mentioned problems should be kept out of management.

    We're not in the 1970's any more; we can do better, no matter what the venture capitalists say.

    Management is essentially a service job. It's not at the same level as a cashier at a fast-food joint, but a manager cannot manage well unless he puts his ego aside, is humble, admits he doesn't know, and realizes he has to serve.

    1. A manager must serve the customers and not deem them disposable, gullible or stupid.
    2. A manager must serve the workers to aid them in bring out their best and achieving goals and not boss them around.
    3. A manager must serve the money people as well; but not by deceiving them nor kissing their asses.

    The blaming manager, the micromanager, the scheming player -- they can ruin products, divisions and even companies.

    Is the 5.5 inch iPhone 6 Plus practical?

    September 2014

    I was one of the vocal proponents of a big-screen iPhone, telling anyone who'd listen that Apple needs to make one with a 5.5 or 6 inch screen.

    I expected the 6 Plus was going to prove me right. After owning the iPhone 6 Plus, I believe I was wrong.

    It's not a terrible phone. But the 6 Plus is rather heavy. While the 6 Plus only weighs 1.52 ounces more than the 6 (6.07 versus 4.55 ounces respectively), that is 1.33 times more, and the difference is almost alarming when they're side by side.

    The expense and delicateness of the 6 Plus means a rugged case is vital. That adds substantially to the weight -- at least an ounce. My preferred case is the Magpul field case, but it's at least 1 ounce.

    Having also owned the cheaper, lighter, and plasticy $150 LG Stylo 2 Plus, which is 5.1 ounces but has a screen that is 5.7 inches, I can say that the 6 Plus compares quite poorly.

    1. The bare 6 Plus is already 1 ounce heavier.
    2. Its high cost and fragility militates for using a rugged case.
    3. Therefore while the LG Stylo 2 Plus can be used daily without a case because it is cheap and replaceable, the 6 Plus with rugged case weighs over 7 ounces.
    Given the hardware situation, only software -- iOS -- saves the 6 Plus, because Android is frankly crap.

    So why go with the 6 Plus at all? While a 5.5 inch screen is a good size for web browsing on the go, it's not a great replacement for a tablet or a laptop.

    Let's consider video watching. If you are not working as a security guard or a librarian, or are otherwise idle in a quiet environment, you won't have a strong need for watching video outside of the home or away from a laptop.

    Let's consider web browsing. Even a 10-inch tablet can make web browsing difficult. A 5.5" screen will be much worse, and it isn't going to be a great improvement over say, a 4.7" display. But it will be much better than a 4-inch screen.

    I'd say that if Apple cannot make a less delicate, expensive, and weighty phone, it should settle on a smaller size. A 5-inch screen may be the Goldilocks size: Not too large, not too small, not too heavy. Just right for practical use while keeping the weight down.

    A repeat loop kludge for Objective C

    September 2014

    Many a-time there's a need in C and Objective C for a simple repetition loop à la 8086 instruction LOOPNZ. But one doesn't always need access to the loop counter itself. To this end, here's a simple #define that gives you precisely that. It may not work in every compiler, but it seems to be safe when used in Xcode.

    #define repeat(COUNT)  unsigned long x##__LINE__ =COUNT; while (x##__LINE__ --)
    

    Usage 1: repeat(10) puts ("message");
    Usage 2: repeat(10) { puts ("message"); }

    But why stop there? If you do need the counter value, just provide it like so:

    #define loop(VARNAME,COUNT) for(int VARNAME=0; VARNAME < (COUNT); VARNAME++)
    #define countdown(VARNAME,COUNT) for(int VARNAME=COUNT; VARNAME > 0; VARNAME--)
    

    The only caveat is that as of Xcode 5, llvm is performing a lot of type checking so you may need to type-cast the variable from the loop and countdown macros.

    Jerry Seinfeld explains why he didn't become a mere television mogul

    September 2014

    But I didn't take that bait... because I know what it is... You can't pull that over on me.
    I've sat in all those chairs.
    I've been in those rooms. I know what it is.

    What is it? You'll just have to listen to Alec Baldwin's interesting and funny interview of Jerry Seinfeld:
    WNYC link

    Resize images from the command line

    August 2014

    On OS/X there is no need to install ImageMagick in order to resize images from the command line. Let's say you want to generate a new set of icons for an iOS app. You can do it with two commands: cp and sips. Below I offer an example, left as an exercise for the reader, on how you might do this from a script:

    cp iTunesArtwork.png Icon-144.png
    sips -Z 144 Icon-144.png  &> /dev/null
    file iTunesArtwork.png Icon-144.png
    




    © Zack Smith