Tagged "programming"

← All tags

  1. Not a bad time at all (tech edition)

    Sometimes it's nice to stop and look around and think about all the things you've been taking for granted. I've been in the process of handing two projects over to coworkers, one small and one large, and it's caused me to go out looking for ways to make that easier. I don't work on an actual dev team: My stuff has been solo efforts, so I'm aware that it probably looks and feels a little different from what everybody else is used to. It was good to find a few tools to make the handover less painful.

    So here are a few things I'm newly grateful for:

    GitHub

    Wow. TextMate has great support for git repositories, so it was super-easy to set up a repository, add all the files, write a few READMEs in Markdown and hand things over. When something needed tweaking, it was a simple matter to make a fix, push it up, and let the recipients know. One of them was on Windows and needed different instructions to get things running? Fine ... I made a Windows branch with its own instructions and dependency lists.

    Maybe not as important, but GitHub made me feel better about dropping that code on my coworkers because it made everything more approachable. It makes the READMEs look good (and readable) and it makes the source easy to browse with pleasant syntax highlighting.

    RVM

    I've been developing with Rails on OS X, able to install whatever I need to get a gem working, updating my rubygems install whenever it suits me, etc. etc. I didn't want to make my coworkers go through custom-building their own Ruby or rubygems, and after a few years of getting everything just so I know there's a chance I've got something on my machine they don't have on theirs. So RVM completely rocked.

    RVM stands for "Ruby Version Manager," and it's a way to get a self-contained Ruby sandbox running on an unprivileged account. At its simplest, RVM lets you bypass your distro's elderly Ruby packages and update your Rubygems package without getting a scolding about how your distro will be pleased to update that on its own timetable.

    RVM can do a lot more: You can install multiple versions of Ruby and switch back and forth between them with something like:

    
    rvm use 1.8.7
    
    

    If you'd like to use whatever Ruby came with your distro:

    
    rvm system
    
    

    If you've got three or four Rubies floating around, you can set a default:

    
    rvm --default use 1.9.2
    
    

    You can also create swappable gem sets.

    VMWare

    I first reviewed VMWare 11 years ago, when this is what passed for a middling machine:

    VMware’s base system requirements are a Pentium II/266 MHz processor and at least 96 MB of RAM. We tested the software on several configurations, ranging from a machine at the very lowest end of the recommended specifications to a Pentium III/500 with 128 MB RAM. Performance is clearly helped by devoting plenty of RAM to the virtual machine. A computer with 160 MB or more is closer to ideal, unless you run X with a conservative window manager and few applications.

    I could have spent some time guessing about what might be needed to get my projects working for somebody else, but it was a lot easier to ask "which distro are you running?" download the necessary disc image, set up a VM to match their environment, then run through installation and testing. I did that twice this week: Once to match a developer's workstation, once to make sure I was testing against the company server platform.

    Ubuntu each time, by the way. I don't know what the current state of the distro wars is, but Ubuntu went up about the way I remember Debian going up: easily and thoughtfully, leaving me with something that Just Worked for my limited purposes. So good for it.

    progress_bar

    So, _I_ know the script is doing what it's supposed to be doing because I've been fiddling with it for a year. Not everybody else does, so there are a few ways to denote that something is happening. One is just adding an extra bit of noise to each iteration of the main loop to simulate a comforting beeping noise. Another is to use the handy progress_bar gem, which adds a progress bar that can show a counter, percentage completed, rate and ETA with just a few extra lines. Looks nice, less noisy, took all of a minute to add.

    #programming #ruby #the future

    Keep reading →
  2. Yes, the iPad is a "Real Computer."

    I’m in the middle of waiting around for my 3G iPad to arrive, but that hasn’t kept me from reading about iPads and peoples’ reactions to them. Emery Fletcher wrote a brief dismissal of the iPad on LinuxPlanet that summed up a certain school of thought:

    Amid all the breathless hype about the iPad, I think one point has been severely overlooked: the iPad is not a computer, it is not a phone – it is constructed to be a receiving instrument. If it were an acronym, I would suggest it was PAD, Passive Amusement Device.

    He goes on to say that “[real computers] let you talk back, add your voice to the topic, contribute your own masterpiece.”

    Fletcher’s making the same mistake a lot of people have made: He’s assuming that because Apple has provided tools that enhance media consumption (iTunes, iBooks, etc.), and because media players have latched on to the large display and publisher-friendly SDK, that must be all the iPad is good for.

    You wonder if people who think that way did the same thing when the first IBM PCs came out, assuming that because IBM marketed them for spreadsheets and word processing, PCs must have been good for nothing else.

    Over the course of the week the iPad was in the house, I used Pages to do a little writing and editing, fiddled around with some photo editing software, stalked out how to connect it to online file repositories so I could get my creative work on and off of it, considered a few HTML editors for the iPad that had already hit the market in the week it had been available, and bookmarked apps that do things like make it easy to wireframe Web sites and iPhone OS apps.

    So much for not being a “real computer.”

    I also ordered O’Reilly’s Building iPhone Apps with HTML, CSS, and JavaScript before the end of the first day the iPad was in the house. Just over a week later, I had a copy of Stephen Kochan’s Programming in Objective C. I really want to learn the platform, and once I have I fully intend to write applications for it.

    The thing a few years of iPhone use and a week of iPad use have caused me to consider is the ways in which Apple’s perceived “retreat” from Steve Jobs’ initial insistence than Web apps would be enough wasn’t really a retreat so much as a reframing. To help make the point, here’s a picture of all the apps on my iPhone, some with red checks.

    ![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2010/04/app_chart.jpg)

    I’ve left a few things out:

    • I haven’t included the apps that ship with the iPhone.

    • I haven’t included the page of games I’ve got.

    • I haven’t included Web pages that I’ve saved as launcher icons.

    If an app depends in large part on access to some sort of Web or online data service, it gets a red check.

    Out of 70 apps, 58 get the red check. Of the remaining 12, most (seven) are photo or image apps of some kind. A few wouldn’t be there if I couldn’t use them with a Web service, but they can stand alone and require access to the hardware to work correctly.

    Of the remaining five, three depend substantially on a network connection and wouldn’t be useful without one, even though they aren’t talking to Web services.

    Even among the system apps, which I left out, the address book, calendar, map app, YouTube app, Safari, stock ticker and weather app are all dependent on Web services of some kind to be useful to me (I sync the address book and calendar with Google’s services).

    In the end, though, if I just go with the 58 out of 70 apps that depend on Web services for the preponderance of their functionality, that’s 83 percent of the apps I use.

    Looking at those 58 apps another way, we can ask how many of their related Web services could just as easily work with another, non-iPhoneOS client. The answer there is “all of them.”

    In other words, developers might have wanted the ability to use a more complex toolkit than simple HTML, JavaScript and CSS allow, but since Apple gave them an SDK to play with, they’ve gone to work writing apps that talk to the exact same data stores a person sitting down to a PC would experience via HTML, JavaScript and CSS. That makes sense: iPhones and iPads are touch-driven and they’re very different from desktop browsers. HTML wasn’t created for touch devices and its conventions are dictated by the presence of a largish display and a mouse. All you get with the iPhoneOS SDK is a different set of conventions for getting at the same pool of connected data. That’s how it has worked out in practice, anyhow.

    So what’s that got to do with me wanting to learn how to program iPhone and iPad apps?

    Simple enough: Initially, I’ll be thinking in terms of how anything I write will relate to some sort of Web service. I’ve got a few ideas already, and I won’t be writing anything in isolation so I’ll be talking to other people who have their own ideas, but in the end anything I write will depend in large part on the Web and it will definitely involve people talking back to that content, either by organizing it in a way that benefits them, sharing their insights about the content with other people, or contributing their own content. Most of the apps I run on my iPhone are all about that. (O.k. One is for ordering pizzas and a few are for checking account balances, but still.)

    The platform invites me to indulge my creative urges as a programmer, and it will allow me to create software that lets other people indulge their creative urges as explorers, travelers and sharers. And when I’m looking for a break from programming, it’ll allow me to sit down and write a story, compose an e-mail, edit some photos or wireframe a site.

    It’s a real computer. Why some people don’t want to admit that is for them to answer.

    #creativity #ipad #programming

    Keep reading →