Browsed by
Category: Technology

Run PHP scripts in native macOS app with Xcode & Swift

Run PHP scripts in native macOS app with Xcode & Swift

Developer Curiosity

Many, many years ago, as an open source PHP and WordPress developer, I had a system for testing arbitrary PHP as I honed my skills and learned new techniques. I had a file on my web server called test-php.php that did nothing but output the results of my code and would spend hours writing code, upload to server, switch to browser, refresh. This is how I learned the basics of regex, converted base64, tested operators, and refined my database access techniques.

I’m with Swift!

On a bored and underutilized day in 2012, I decided to figure out how to write an app to simplify the process. I had similarly written two apps previously, the first of which was a rip on a crazy flub by the Mitt Romney campaign when they released a campaign app called, “I’m with Mitt!” which would overlay Mitt Romney Oh ’12 campaign slogans on live photos. Hilariously, their developers failed to QC it thoroughly, ending up with a silly typo on the main overlay which draped the photos, meant to be shared socially using the app’s built-in functionality, with the slogans, “A Better Amercia” and “I’m with Mitt”.
forkme_right_darkblue_121621 Run PHP scripts in native macOS app with Xcode & Swift
That was not typo in my post. I know how to spell America. So, being smart like I am, I built an app that did the exact same thing. Except I misspelled “Mitt” as “Milt”. I called it “I’m with Milt” and overlookably misspelled something in every overlay.

Read More Read More

YouTube: Something went wrong. Tap to retry.

YouTube: Something went wrong. Tap to retry.

YouTube videos won’t play on iPad!

For the past two weeks my kids have had trouble watching YouTube videos on their iPads. It works for a while, then they see a message after the video’s ads play saying, “YouTube: Something went wrong. Tap to retry.” This issue has been prompting YouTube iPad users to “Tap to retry” for years.

The only solution for making the YouTube app work on their iPads has been to completely reset their “Network Settings.” I’ve googled this issue 20 times, but haven’t seen a solution, so here’s what I did:

youtube-bloody-logo-tap-to-retry-2 YouTube: Something went wrong. Tap to retry.

Read More Read More

Mac Dad’s adventures in PC gaming: Rust on Steam

Mac Dad’s adventures in PC gaming: Rust on Steam

Attn: All Mac Dads

If your kids ask for a PC for gaming, just tell them you can’t afford it. It won’t be a lie, specifically, considering how much time you have to spend updating drivers and frameworks.

cropped-Logo_Transparent-300x76 Mac Dad's adventures in PC gaming: Rust on Steam  Tonight my oldest wanted to try out a PC game called Rust. According to Steam’s Rust page, “The only aim in Rust is to survive. To do this you will need to overcome struggles such as hunger, thirst and cold. Build a fire. Build a shelter. Kill animals for meat. Protect yourself from other players, and kill them for meat. Create alliances with other players and form a town. Whatever it takes to survive.”

Sounds legit, right? I added funds to his Steam account, and told him to go ahead. Just kidding! PC gaming is so complicated that you can’t simply shove money into an account and say “go!” So after an hour of typing in passwords, birthdates, logging out, logging back in, putting my birthdate in instead of his, logging out again and then back in, I finally got through it all and then, stopped dead in my tracks by some pop-up window installer called something like “Super Easy Don’t Cheat Installer.

Read More Read More

Parental Controls are a Perpetual Parental Annoyance

Parental Controls are a Perpetual Parental Annoyance

Parental Controls with Steam

Steam_icon Parental Controls are a Perpetual Parental Annoyance  According to Steam, I can either disable parental controls, anti-malware, anti-virus, and browser privacy settings, type in my root password, and give Steam unfettered access to control the operating system as if it were sitting at the computer using its fingers, or I just tell them they can’t play Portal 2.

Steam_icon Parental Controls are a Perpetual Parental Annoyance  2000px-Apple_logo_black.svg Parental Controls are a Perpetual Parental Annoyance  Apple’s Safari Brower

www.boyslife.com is a restricted site that requires an admin password to access.

YouTube is Strictly Bad About Restrictions

Steam_icon Parental Controls are a Perpetual Parental Annoyance  2000px-Apple_logo_black.svg Parental Controls are a Perpetual Parental Annoyance  4481461680_4273d06822_b Parental Controls are a Perpetual Parental Annoyance  Even the most basic restrictions on YouTube block them from 75% of the Minecraft videos they want to watch.

Is Disabling Parental Controls the Only Option?

Read More Read More

Technological solutions to common problems

Technological solutions to common problems

A guy on the bus the other day was openly criticizing those around him for abandoning the world around them in favor of the pale imitation our handheld devices offer up.

A friendly woman next to him unwisely* offered up a different perspective. “It’s interesting to think about whether this is any different from reading a book or newspaper on your commute. Some might be studying or reading the news. I wonder if we have always tended to isolate ourselves in these situations, and the difference now is that anyone who is unfamiliar with one method or the other makes assumptions about what’s going on on the other side of that barrier.”

IMG_0012 Technological solutions to common problems
All this technology is making us antisocial

For a second I thought she was bravely bridging a gap with this old guy who had an armful of old, used (out of print looking) vinyl records and sheet music he’d obviously just acquired. But no. The old guy flew into a rage about how the internet is a “breeding ground for witches and slutty feminists who have no respect for our Christian culture!” He angrily sputtered on about the muslims, the gays, and abortion culture tearing the fabric of society apart until he disembarked at 15th and Pine.

It was sad because this old guy was dressed in dapper digs from the 40s, on the 10, and looked like a Capitol Hill native. He looked like a fascinating old guy and I would bet he has a trove of stories that would enrich all of us to hear, even if it is tinged with bigotry. I mean, Cap Hill has has a much more varied past than you might know just living here now.

There comes a point, I guess, no matter how young you feel, where you realize you’re old.

There comes a point, I guess, no matter how young you feel, where you realize you’re old.

My boys have their own computer where they play games I’ve installed which seem to not cross my boundaries for what’s ok for kids to play. One of the games I’m sort of on the fence about because it seems to bring out a lot of creativity, while also creating an unpredictable anxiety in them, is Minecraft.

So I limit their time with the game while I monitor their behavior surrounding their exposure to it. It’s not like it’s all that different from other games, but for some reason they get really into it and fight over who gets to play on the computer.

This means their computer gets lots of use. Which is cool, since it’s the laptop I bought back in 2008 that has been the bane of my professional life for at least 2 years. I put an SSD in it and 6 gigs of ram to buy it new life, so I’m glad it’s finding a useful retirement phase.

The thing is, though, my kids have never known or used a computer you turn off. The iPad and iPhones they’re used to just turn off when you’re done with them.

Without my guidance, they’ve discovered how to “turn off” the computer.

> Hit the mute button on the keyboard.
> Hit the power button on the monitor.

So I end up sitting here for much of the night after they go to bed half consciously trying to figure out why one of my devices is fans-ablaze until finally I realize that Minecraft taxes the shit out of that laptop and it’s been on since 8:00 with nobody even paying attention to Steve’s needs or intentions. (I think Steve is the Mincraft guy’s name…my kids call him Steve.)

I pick up the mouse, turn on the monitor, and Steve’s just standing there, staring into a wall or the sky or something. And the fans are at top speed trying to keep the processors and ram cool.

Command Q quits the game and within 30 seconds the fans whir down to silent. So, next step, after Ian’s potty trained, teach them how to quit a game on a computer that doesn’t just handle all that shit for you.

Computers that don’t need to be turned off, programs that don’t need to be quit, documents that don’t need to be saved, information that doesn’t need to be backed up, software that uses the same data source, no matter where you’re using it. That’s quickly making me feel old with these devices that were so transformative for me, so freeing, but are now so confounding to my kids.

How websites track you without tracking you

How websites track you without tracking you

Every time I look up a product on Amazon, Facebook shows me ads for it. Items I’ve decided, for various reasons to find out more about through Amazon’s great online shopping mall, consumer ratings, aggregated storefront, and official-like repository of information about basically any mass produced, consumer oriented product you might ever find yourself needing more information about.

But, usually, any item I take the time to read about on Amazon I’m ready to buy as long as it fits my requirements. If I didn’t buy it I’ve formed a negative opinion of that product, so all I think when I see the ad is, “I didn’t get that one because it sucks.”

“Clear your cookies,” says old fashioned wisdom.

I did just that. FB made me log in again, but I cleared my cookies and set 3rd party cookies to banned. It’s probably too late though. Amazon and FB have traded info about me and then they told two friends, and they told two friends…and so on.

And, in all honesty, you give little bits about yourself to any site that asks for it because you think it’s not personally identifying information. But you say, “I want the weather for 98122. I’m ok with giving them my ZIP code since there are tens of thousands of people with the same.” But then that site make a deal with a company who has your IP address or some other anchor point for tying this data together. And some other site asks for your email address, buys into the data aggregation system (sometimes not knowing they’re doing so…) giving another anchor point.

Then every single little detail you give to any site gets connected through these aggregators to some personally identifying anchor data. There are companies that exist simply to aggregate data about you and all of these sites that you frequent can know way more about you than what you tell them.

Then there’s a database with all of these data points where someone smart enough can go in and say, “a male, birthdate 1/1/1980, with the username tonyj logged into my site from this IP address. What else can I find out about him.”

The answer is EVERYTHING. Sites always promise to never share personally identifiable information about you. But with everything that’s out there about you, a concise picture can be compiled of who you are, what you Google, which sites you visit, when you were born, your skin color, your address, your OS preference, which browser you use, and what you do for a living.

These services can find you and your compiled profile with a few bits of information you don’t realize you’ve freely given to a service that aggregates information that is, alone, not “personally identifiable,” but when it’s all anchored to something even vaguely unique you are easy to identify.

Just Google your personal email address or full name. Pick up anything that is correctly associated with you and put it into a spreadsheet. Anything there can be, and is, used to identify you by anyone with your email or IP address. Do the same with your common user names.

I have a desire to set up a project that randomizes names, addresses, interests, genders, ethnicities, professions, afflictions, fetishes, user names, family history, etc. Each interested party can retrieve a completely random set of personal details for their fake persona. Then in ten steps or less, the system will ask them for “non-personally identifiable” information that they’d be fine with divulging to any one entity. Fake ZIP code, fake first name, fake gender.

In two to three jumps, it will show them their exact profile. Along the way, I’d like the system to show users how it’s narrowed down so easily: Gender F. 600,000 possibilities. Of those, ZIP 90210. 7,800 possibilities among registered individuals. Of those, First Name Tanya. 12 possibilities. Of those, once searched for “red sweaters” and made a purchase using a credit card. 1 possibility. Tanya Johnsen. Address 1234 7th Ave. Attended UCLA. Last known phone number, according to student roster, 415-234-5555. Purchases large, cheap bottles of wine at Safeway using that phone number to receive a discount.

What time is the Super Bowl?

What time is the Super Bowl?

The Atlantic has a fascinating piece on search engine optimization that goes fully meta. What time is the Super Bowl? Even as I look at these letters, words, it almost looks like every “l” is a number one. A “1” as compared to a “l”. It’s late. Or early, depending on your specific outlook. Here’s a specific paragraph that I felt like quoting.

HuffPo, Time, and the Washington Post all got good at this game, running operations to arbitrage Google’s at-that-time extensive trend data. The operation didn’t exclusively concern itself with traffic, though: By writing about what people were searching for, you were writing about what they were thinking and wondering, too. You could glimpse the web’s conversations taking place.

I liked the use of words in this post. I should list a few of my favorites here:

Arbitrage:
Screen-Shot-2014-02-01-at-6.57.04-AM What time is the Super Bowl?

Etymological:
Screen-Shot-2014-02-01-at-6.57.04-AM What time is the Super Bowl?  Screen-Shot-2014-02-01-at-6.59.56-AM What time is the Super Bowl?

Mr Meyer, writing for the Huffington Post, self-referentially in this article The HuffPo, writes about “When Does the Super Bowl Start?” in a manner that references search engine optimization as a subject, not just a goal. Simultaneously making it a goal, the article seems to skirt the meta SEO, discussing how to optimize while following its own guidelines.

The Super Bowl starts at 6:00 pm, I think. My friend Brad made a whole post about this. The Super Bowl. Not the meta nerdiness of it. That’s my job here.

Being conservative has its benefits

Being conservative has its benefits

I’m a huge nerd. I serve HariKari.com from my house using Mac OS X Server only because I love this technology. I love the pressure it creates for me to learn something I might otherwise not even be involved in.

The bloggers here might take umbrage. It’s been pretty smooth sailing, with the occasional sea-sickness, but nothing like this past week. So for me to have different goals from theirs – the spreading of democracy and the informing of the masses – I can see it being something I have to explain.

The site went down last week and, as has been the case before, I was sure that a reboot, or DNS change, or permissions issue, or unpaid bill was the root cause. But no such luck. Unfortunately, it turns out, my liberal policy of early adoption of new tech, ironically, is what took the site down.

I have an obligation to these guys to keep the site up. They don’t pay me, they don’t ask for 24/7 support, I’m a volunteer, and so are they. We’re a team of people who care about what we’re doing. That’s why this works.

Last week, however, I decided to upgrade to a developer preview of the software that HariKari.com is served with. It turned out to be a huge mistake because everything just stopped working and, due to it being pre-release software, only available to people who’ve signed a non-disclosure agreement, there’s no stackexchange.com thread to help you figure out what you did wrong.

In this case, I should have been more conservative. I shouldn’t have risked something as important as this blog is to my friends to satisfy my curiosity about emerging technologies.

But, as I started writing this mea-culpa, I came across some interesting realizations. First, I think there’s a lot of intentional conflation between being conservative when it involves imposing your own interests on those to whom you have a social obligation and being conservative to preserve your own investment in the status quo. In fact, the former strikes me as quite liberal.

Second, being considerate of how your needs might impose upon others doesn’t strike me as liberal. This is probably the same point I was making previously, but holding back your need to impose your beliefs on others seems quite conservative!

More personally, being conservative in my adoption of new technology has never benefitted me in the jobs marketplace. I’ve been an early adopter all my life and it’s served me well. Both socially and technologically, I’ve benefitted from forward thinking and adaptation.

Where being conservative has benefitted me is where I held back my own passions to make consideration for others. When I’ve been unsure that the risks I’m willing to take won’t work to the detriment of those to whom I have obligations, holding back conservatively has always been the right choice.

In this case, I didn’t. I mistakenly let my trust in my own techno-lust override my judgment and screwed over some people to whom I have not only a professional, but also a personal and emotional obligation.

For that, I apologize.

Harikari shutdown

Harikari shutdown

Greetings loyal readers. Harikari is back online. We can either blame the temporary shutdown on a new developer version of OS X that has some connectivity problems, or we can blame it on John Boehner. I am going with Boehner. Everything bad that happens now – I blame John Boehner.

Thanks to webmaster Tony and President Obama for getting it up and running again.