Computers

Many iOS apps today are clients of some sort. They request data from a remote server. Typically this data is served over HTTP (with SSL) and formatted as JSON. At FastModel Sports our iOS app is constantly requesting large amounts of JSON data. While debugging the app I inevitably have to compare what I’m displaying in my views to what the server sent me.

This meant saving the server response into an NSString, printing it out to the console with NSLog, copying that output, switching to Terminal, pasting that output into a file and then running jq on that file. That’s a lot of steps. In this post I’ll show you how to do all of that directly from the LLDB command prompt.

more...

Another in a series of posts documenting my process of updating an aging app.

For this rewrite of Qur’an Memorizer I’m using Auto Layout. This is the first time I’ve used Auto Layout for this app. You know when the Apple Engineers said Auto Layout makes things easy? They weren’t kidding. Even though Qur’an Memorizer has some unique behaviors for autorotation, I was able to implement this in a few hours with Auto Layout and about 25 lines of code. Read on to see what I did.

more...

In my last post I wrote that I followed some instructions to exclude myself from Google Analytics’ reports on my Octopress blog. There was an error in the Javascript that was preventing the required cookie from being set. Here’s what I did that finally worked:

more...

[Another in my series of posts on Vim]

If you’re a developer, you will often find yourself having to insert a line of dashes or hashes (#) or asterisks into your comments.  In this post I’ll show you how to do this quickly.  Memorize this because you’ll wind up doing this often.  Position the cursor to the beginning of a blank like (in command mode) and enter the following:

80a#<ESC>
more...

When I first learned how to exist on UNIX, in 1988, I used vi as my primary editor. During the next nine years I taught myself how to become a power user - migrating from the simple motion and copy and paste to more complex skills like marks and named registers. When I started graduate school I saw many of the professors and grad students using emacs.  I tried it out a couple of times, but it was not until 1997 that I decided to take the time to stick with emacs and take the time to learn the right way to do things even when I could get the job done faster in vi.

more...

In a earlier post I wrote about how important it is to have your data backed up.  On my Macs, my main backup utility is Time Machine, which comes pre-installed with the Mac OS.  Time Machine can also back up external hard drives, even though it may not be obvious how to do it.  This article shows you how to change the default settings to do this.

more...

Happy with my experience with a custom WordPress installation for this blog, I decided to try using the blogging platform for the TaskForest website.  The two main reasons were the ease of creating RSS feeds and the ability for users to comment on posts or articles.  After a few days of tinkering around, I’ve come to the conclusion that, at least for TaskForest, WordPress would cause more problems than it would solve. Here’s how I came to that conclusion:

more...

The #grid website has a great tool for web designers -it “inserts a layout grid in web pages, allows you to hold it in place, and toggle between displaying it in the foreground or background.”  Go to their website and have a look.  It’s pretty impressive. Simple, but impressive.  I think I’m gonna give this a shot for the next web site I design.  I think it would be really useful in development, not as much in a production environment.

more...

If you’re like me, you spend a lot of time jumping from project to project in a Linux shell.  I find that I have to switch back and forth between directories.  The bash shell has commands to maintain a stack of directories.  I’ve written some functions that use these utilities to make directory navigation easier. I’ve found these functions very useful, and perhaps you will too. Let’s see them in action first with some examples, and then look at the code:

more...

In yesterday’s article about Google Buzz, I guessed that “the problem was that the population for whom the system was designed wasn’t necessarily the only population actually using the system.”  I gave Google the benefit of the doubt:

I am certain Google tested their application thoroughly.  They’ve been known to do extensive usability tests for the seemingly tiniest of changes to their web site.  But even the most well-implemented tests are incomplete if they’re not performed on a statistically representative sample of the audience.

But today, the BBC reported that Google has admitted that they only tested Buzz internally, and bypassed their regular rigorous testing procedures — possibly in an attempt to get it out the door as soon as possible. I’ll let the pundits decide if it did more harm than good to the firm, but it’s a warning to other software developers: skipping testing can lead to embarrassing failures.

more...

In the first few days after the release of Google Buzz many people (including myself) criticized Google for exposing their users’ private information.  This was a couple of weeks after Apple got a lot flak for their unfortunately-named iPad, and the same week that we heard reports of a woman who broke up with her boyfriend after finding some suggestive text messages on his cell phone - messages that came pre-loaded on the phone.  I think that all these cases were not caused by a lack testing, but by testing the wrong audience.  Let’s examine these three cases and see what we can learn from them:

more...
© 2019 Aijaz Ansari
The Joy of Hack by Aijaz Ansari is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Powered by Pelican