There are times when I have to log into Linux systems that don’t have window managers. I have a single terminal window in which to work. With the help of tmux, I can have multiple virtual windows in my single window. Each window can be split into panes. I can also save sessions so that I can bring the environment back after I disconnect from the system and reconnect several days (or weeks or months) later. In this blog post I’ll share the most important tmux commands.
I’m gonna have to blog about how I did this (later). I’m giving a live-coding talk on Tuesday. I was gonna use Snippety but it lacks a minor feature and I didn’t wanna bug the author Marin Todorov this week of all weeks. So I hacked up a pretty workable facsimile using KeyboardMaestro.
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.
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.
The stupidity of this is mind-boggling. Essentially, LinkedIn is asking you to insert a man-in-the-middle IMAP server that parses ALL your email and modifies the body so as to ‘enhance mobile email, giving professionals the information they need to be brilliant with people.’ The following tweet from Justin Miller first brought this to my attention:
First
One of the features of Qur’an Memorizer, my first iOS app, is the ability to highlight a verse (ayah) when it’s tapped. To do this I access a database of verse x and y locations and retrieve the 4 coordinates I need to draw the resulting polygon.
The first version of the code released to the App Store looked a little bit like this:
As an amateur photographer I like displaying my photos on my blog, especially when there are particularly interesting stories behind them. In this post I’ll show you how to modify the default Octopress theme and add a type of layout that highlights a single photograph. You can see an example of this in this sample blog.
[Another in my series of posts on Vim]
Sometimes when you’re typing natural language text, you find yourself wanting to rephrase the sentence you’ve written so far. You could hit backspace many times to delete the characters to the left of the cursor, or you could type Ctrl-W. When you’re in Insert mode, Ctrl-W will delete from the cursor to the beginning of the previous word.
[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>
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.
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.
Wow. This cool Firefox feature has been around since 2005, but I just found out about it a few months ago! I swear I haven’t been living in a cave all this time. So if you’re like me and don’t know about this yet, listen up: In Firefox, you can bookmark a search with a keyword, and then use that keyword in your URL entry field. As this article shows, you right-click on the input field and select “Add a Keyword for this Search.” This will allow you to bookmark the search and add a keyword. I usually use two letter keywords like ‘we’ for weather.com and ‘im’ for imdb.com.
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:
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.
The Common Weakness Enumeration (CWE) has released their list of Top 25 Most Dangerous Programming Errors. This list and the explanations of the errors are very instructive and should help both novice and expert programmers. If you’re a developer, I strongly urge you to read this document and make sure you understand the concepts it covers.
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:
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.
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:
I came across some comments made about an open source program that I had written in perl. The user was complaining about how he couldn’t get it to install. The reason was that the program relies on other modules from the archive of open source perl software known as CPAN (Comprehensive Perl Archive Network), and one of them failed to install.