Browsing articles in "Software"
Mar
24

The Internet Is Too Small to Be Snarky

By Rob Warner  //  Development, Mac, Software  //  No Comments

Last week, I was frustrated with Oracle SQL Developer (on Mac OS X) for two reasons:

  • When a connection times out (after being left idle too long), the application hangs and I have to Force Quit and restart it.
  • Every 90 days, the passwords for our databases change, so an updated connection XML file is put into source control (passwords are encrypted, and we aren’t allowed to know the passwords) and we have to import the new connections. You can’t delete multiple connections at a time from the SQL Developer interface, and importing over an existing connection pops up a Yes/No dialog box asking you if you want to overwrite the existing connection. Since the file contains about 30 connections, this means clicking Yes to the same dialog box 30 times.

I decided to vent, and tweeted this:

The first part of the tweet contains sage advice: developers should indeed use their own software regularly, and that will encourage them to build better software. Then, however, I took a snarky swipe at the developers who work on Oracle SQL Developer. Oracle is a soulless corporation after all, right? And it’s not as if real people work on that software, right? My tweet is in no way offensive, right?

Then I got this tweet:

Wow. Not so soulless after all: a real person who not only cares enough to respond to my tweet, but also chooses to ignore my snark and answer with an attitude of helpfulness and class. Properly chagrined, I explained the two issues I was having, and he asked which version of Oracle SQL Developer I was using. Um . . . it turns out that the version I have is pretty old, so he encouraged me to upgrade, and even told me the latest version that would work on my (work) Snow Leopard machine. I downloaded it, connected to a database, and then let it sit for hours. Then I ran another query. In the past, this would cause SQL Developer to hang, and I’d have to Force Quit it. With this new version, however, it automatically reconnected to the database and ran the query. Success!

Let’s look at what I did wrong:

  • When I had a problem, I just felt victimized and did nothing about it. For years.
  • I never bothered to look for any updates to this piece of software.
  • When I got frustrated enough, I took a public swipe at the developers.

I’m a developer. I should know better. I ship buggy code. I release updates all the time that fix bugs and add new features. I don’t enjoy criticism, especially snarky criticism, and especially about something I’ve already fixed!

So, Jeff, I apologize, and I thank you for your help. And for the unspoken reminder to stay classy. I’m still hoping for a smoother, less-interactive import of updated connections, but this time I’ll ask nicely. 

And, since Jeff deserves the last word on this far more than I, here’s his response when I told him the new version corrected the application’s hanging:

Mar
19

Setting Up My New MacBook Pro

By Rob Warner  //  Development, Mac, Software  //  1 Comment

I just bought a new MacBook Pro to replace my mid-2010 MBP. This is my first retina laptop, and it’s beautiful. I’d been waffling for awhile, but I’m glad I took the plunge.

I briefly considered transferring all my stuff over from the old MBP, but I figured it was time to start clean. I use my laptop primarily for development (Objective-C, Java, Ruby, Clojure, JavaScript, Web, . . .), writing, and a little bit of graphics work. Here’s what I did after walking through the setup wizard:

  • Go to the App Store and install all updates
  • Set the hostname (System Preferences > Sharing > Computer Name) to “Truth” — homage to Paul Pierce
  • Install Chrome Dev Channel
  • Install Xcode from App Store
  • Install Dropbox and let it sync
  • Set up links to config files:
    1. ~/.bashrc -> ~/Dropbox/config/.bashrc
    2. ~/.bashrc.local -> ~/Dropbox/config/.bashrc.local
    3. ~/.vim -> ~/Dropbox/config/.vim
    4. ~/.vimrc -> ~/Dropbox/config/.vimrc
    5. ~/.vimrc.local -> ~/Dropbox/config/.vimrc.local
    6. ~/.vimbundles -> ~/Dropbox/config/.vimbundles
    7. ~/.gitconfig -> ~/Dropbox/config/.gitconfig
    8. ~/bin -> ~/Dropbox/config/bin
    9. ~/.atom -> ~/Dropbox/config/.atom
    10. ~/.lighttable -> ~/Dropbox/config/.lighttable
    11. ~/Library/Application Support/Sublime Text 3/Installed Packages -> ~/Dropbox/config/st3/Installed Packages
    12. ~/Library/Application Support/Sublime Text 3/Packages -> ~/Dropbox/config/st3/Packages
    13. ~/Library/Application Support/Brackets -> ~/Dropbox/config/Brackets
  • From command line: echo ‘. “$HOME/.bashrc”‘ > ~/.bash_profile
  • From command line: defaults write -g ApplePressAndHoldEnabled -bool false
  • Change Caps Lock to Control
  • Set Key Repeat Rate to Fast (slider all the way to right) and Delay Until Repeat to Short (slider all the way to right)
  • Turn on display of ~/Library (open home in Finder, Cmd+J, check Show Library Folder)
  • Install Homebrew and packages:
    1. macvim (editor)
    2. git (source control)
    3. hub (source control for working with Github)
    4. leiningen (Clojure project manager)
    5. node (JavaScript development framework)
    6. wry (App.net command-line client)
    7. mongodb (NoSQL database)
    8. tig (text-mode git interface)
    9. mysql (RDBMS)
    10. tmux (terminal multiplexer)
    11. elixir (Erlang-based language)
    12. ctags (tag generator)
    13. markdown (markup language)
  • Install Homebrew Cask (thanks, @pittman!) and apps:
    1. tower (source control)
    2. evernote (note taker/junk drawer)
    3. appcode (Objective-C IDE)
    4. webstorm (JavaScript IDE)
    5. rubymine (Ruby/Rails IDE)
    6. marked (markdown viewer)
    7. path-finder (finder alternative)
    8. iterm2 (terminal alternative)
    9. kaleidoscope (diff viewer)
    10. codekit (less/sass/coffeescript autocompiler)
    11. fluid (make apps from websites)
    12. firefox (web browser)
    13. brackets (editor geared toward Web development)
    14. kiwi (App.net client)
    15. copy (cloud storage)
    16. hazel (automation utility)
    17. bbedit (editor that can edit plist files)
    18. calibre (ebook reader)
    19. balsamiq-mockups (interface mockup application)
    20. sizeup (window manager)
    21. alfred (launcher)
    22. lighttable (Clojure IDE)
  • Install others:
    1. Java 7 & 8 (language)
    2. Ubuntu Mono font (my current favorite programming font)
    3. rvm (Ruby version manager) and latest ruby
    4. safe (password management utility — gem install safe)
    5. Atom (editor)
    6. Sublime Text 3 (editor)
    7. Eclipse (Java IDE)
    8. viPlugin (Eclipse vi plugin)
    9. meteor (JavaScript framework)
    10. Macaw (Web development tool)
    11. Photoshop (graphics editor)
    12. MS Office (productivity suite)
    13. Google Drive (cloud storage)
    14. Box Sync (cloud storage)
    15. Snapz Pro X (screenshots)
  • Install App Store apps:
    1. Caffeine (prevent mac from sleeping)
    2. Archy (Google Docs management)
    3. Oyster (regex IDE)
    4. Paprika (recipe manager)
    5. Dash (documentation viewer)
    6. Unclutter (scratchpad/clipboard viewer)
    7. Glui (screenshots)
    8. Skitch (screenshots)
    9. Pixelmator (graphics editor)
    10. Sketch (vector graphics editor)
    11. CodeRunner (run code)
    12. Patterns (regex editor)
    13. Twitterrific (Twitter client)
    14. Requester (HTTP client)
    15. Todo (task manager)
    16. MarsEdit (blog editor)
    17. Base (SQLite client)
    18. OneDrive (cloud storage)
    19. OneNote (note manager)
    20. xScope (screen measurement utility)

Whew! That’s a lot of stuff, but I installed only the stuff I use (well, except for OneNote—I’m going to give that a whirl). That’s an awful lot of text editors, I know, but I hate to miss out. I left a lot of stuff out, too. Let’s see how long I go before I install something else!

EDIT: OK, so the nested lists look terrible, so I changed the nested ones to ordered. I also added xScope, which I had already installed but somehow missed on the list. I also noted that I had changed Caps Lock to Control and changed Key Repeat Rate and Delay Until Repeat.

Jan
22

The Node Sessions: The Best of OSCON 2011; O’Reilly Media

By Rob Warner  //  Development, Software  //  No Comments

Various Node.js gurus explain and explore the power of this server-side framework in this collection of videos. Two years later, the videos age pretty well, considering they cover Node.js 0.4.x and 0.5.x, and today’s current version is 0.10.x. The speakers range from Node committers to heavy Node users, and you gain insight into not only how Node works but why it works that way. Some highlights:

  • Real Projects Built in Node and Developing Cloud9 in Cloud9 speak to the what works and what doesn’t in real-world use. Advice includes to use libraries like Puppet for configuration and Log Magic for logging. Cloud9 continues to grow and is an excellent way to get started with Node.
  • Using jQuery with node.js introduces jsdom and how you can use this powerful framework on the server side. It implements the DOM as if it were a browser so jQuery selectors et al work fine.
  • Running Node.js in Production and Node at Scale tells you how to make sure your Node app scales in real-world use. It covers how to choose meaningful benchmarks, how to structure your code, how to deploy, and how to keep your dependencies stable using package.json
  • Programming a Chat Server does some live coding to show what you can do with sockets.io and Node. You can see the result at https://github.com/guille/oscon-chat.
  • Why We Chose Node compares the dynamic nature of JavaScript with static languages like Java and C++, and explains the importance of being able to see exactly what’s going on when errors arise.
  • Network Programming with Node.js talks about the challenges of porting Node to Windows.

I wish the speakers had repeated the questions before answering them–you’re left guessing what question the answer matches. Talks mostly finished ahead of schedule, reflecting perhaps speakers new to speaking. The information is prime (albeit dated), though, and the whole offers a good introduction to the world of Node.js.

Find the videos here: http://shop.oreilly.com/product/0636920022183.do

Jan
10

How to Lock Up Linux Using Sublime Text 3

By Rob Warner  //  Development, Linux, Mac, Software  //  No Comments

Steps to Lock Up Linux Using Sublime Text 3:

  1. Log in to your Mac OS X machine.
  2. Install VirtualBox.
  3. Install a Linux virtual machine.
  4. Boot that Linux virtual machine.
  5. Install Sublime Text 3 on that Linux virtual machine.
  6. Launch Sublime Text 3 and open some files for editing.
  7. Hit Cmd+P to Goto Anything….

There you go. As we say in The Deep South, you’re locked up tighter’n a tick. You can click around, mash keys, yell, and curse, even for a long time, and you’re completely stuck.

Steps to Unlock Linux After Sublime Text 3 Has Locked It Up:

  1. Hit Cmd+P to uncheck the Machine > Pause (Host+P) menu item.
  2. Hit Ctrl+P to Goto Anything….

Don’t ask me how I know this; maybe I read it somewhere.

Jan
9

Installing ForgeRock OpenAM and Apache 2.4.6 on Ubuntu 13.10

By Rob Warner  //  Linux, Software  //  No Comments

TL;DR

touch /etc/apache2/httpd.conf

Enter /etc/apache2 as your Apache Server Config Directory Path

copy the generated line from httpd.conf to apache2.conf

The Story

I’m no sysadmin, as will become clear rapidly in this post. I develop software, including Web software, so I have some knowledge of Apache and how to set it up and configure it, but for anything tough I scurry to real sysadmins.

I’m currently on a project at work to replace our Sun/Oracle OpenSSO installation with ForgeRock OpenAM, so I plopped a Linux VM on my MacBook Pro and worked my way through installing OpenAM using the ForgeRock’s Getting Started with OpenAM document, which is easy to follow and works well. When I got to the OpenAM Web Policy Agent installation, however, I stumbled. I ran the commands:

$ cd /path/to/web_agents/apache22_agent/bin
$ ./agentadmin --install

I was prompted for the Apache configuration directory:

Enter the Apache Server Config Directory Path [/opt/apache24/conf]:

I had installed Apache 2.4 through apt-get, so I knew /opt/apache24/conf wasn’t correct. I poked around a bit and found /etc/apache2, which looked like a configuration directory to me, so I entered that. I got this error message:

ERROR: Invalid Apache Server Config directory . Please try again.

After trying all kinds of directories that had “apache2” in the path (see? I told you I’m no sysadmin) and getting the same error each time, and after prying open the shell script and seeing that all work was being done in Java, so I’d need a decompiler to crack this open, I paused a moment to think: What would this script be looking for to validate that the directory I entered was indeed an Apache Server Config directory? I figured it was probably looking for httpd.conf, which is the configuration file I’m (slightly) familiar with and which didn’t exist anywhere on my system. So, I typed:

touch /etc/apache2/httpd.conf

I re-ran the OpenAM Web Policy Agent installation, and everything worked. The installation wrote this line to httpd.conf:

include /opt/web_agents/apache24_agent/Agent_001/config/dsame.conf

When I tested my newly-protected page, however, OpenAM did nothing to prevent access. After a bit of thought, I figured that httpd.conf was being ignored, so I copied that line into apache2.conf, and then OpenAM blocked the page appropriately. Success!

Hope this helps someone.

Aug
26

The Imperfect Craft | Bitsplitting.org

By Rob Warner  //  Development, Software  //  No Comments

The Imperfect Craft | Bitsplitting.org: “I’ve seen what happens to people who cling to outdated standards of craftsmanship: they become self-righteous, bitter, and delusional. Guided only by the hallowed rules of yesteryear’s geniuses, they and their work become marginalized. Without a foothold in the modern technological context, programmers who should be great are rendered effectively incapable of developing their craft.”

One of the things I love about software development is that it always presents mountains to learn. I don’t understand developers who aren’t constantly learning, trying new things out, and experimenting. This article really struck a chord with me. I love this quote as well:

As a modern software developer, I derive as much joy from remaining relevant as I do from the thrill of identifying and solving the particular problems in my work.

I also love that I’m posting this from MarsEdit, Daniel Jalkut‘s software.

 

Aug
7

Validation Errors in Eclipse and Alpha-Bits

By Rob Warner  //  Development, Java, Software  //  No Comments

Cartoons owned Saturday mornings, back when I was young enough to care. The commercials that wedged their way in and between The RoadRunner and The Justice League seemed to hawk either toys or breakfast cereal, all of which I longed for. My mother decried “sugar cereal” and preached the virtues of rolled oats.

One particular cereal commercial that lingers in my dwindling memory showed various calamities creeping up on the blissful muncher. Each time, at the precise moment preceding attack and doom, the happy eater would show his or her spoon spelling out the calamities’ titles in Alpha-Bits (“MONSTER”, “TORNADO”, “BOA CONSTRICTOR”), declare, “I ate ‘em!”, and shovel the coveted sweet crunchiness down the hatch. The monster/villain/brute would promptly disappear. It was magical.

Today, I was working with a web project in Eclipse that had various dependencies and Gradle builds and GlassFish deployments and an Error in the Problem view had me at an impasse. It was some nonsense about a Validation error, with key pieces of data (like an explanation of what failed to validate glaringly missing). I tried turning off validators, but that hung Eclipse. I tried restarting Eclipse. I tried refreshing the project. I tried rebooting my Mac. No dice. Finally, I right-clicked the validation error int he Problem view to see if it would offer a menu.

It did.

One of the options was “Delete.”

No way.

I tried it.

I ate ‘em!

Poof–it disappeared.

Weird.

Of course, Stack Overflow already knew that. It always knows.

http://stackoverflow.com/questions/3420536/how-do-you-clear-the-validation-errors-in-eclipse

Jul
1

Gas Pump Mashup: Software and Signware

By Rob Warner  //  Development, Software  //  No Comments

I was filling my gas tank the other day and saw this sign on the pump:

Gas pump

Apparently, it’s easier and cheaper to slap a sign on a pump than to fix the software.

I puzzled over this bug a bit; why would a gas pump refer to high-ankled footwear or English trunks? Then I realized it probably refers to “Insert Boot Disk”–I guess there’s some corruption when accessing the string table, perhaps, and sometimes the pump displays the wrong string when prompting for a ZIP code.

“Enter Data,” though, sounds like pure laziness.

Jul
1

CodeFest 2013

By Rob Warner  //  Development, Software  //  No Comments

Last Friday, the operations and infrastructure folks where I work were swinging the non-production environments to a new datacenter. The development managers decided to use this opportunity to challenge the developers to a “codefest”–a 1-day programming challenge. The rules boiled down to:

  • You must come up with your idea beforehand and submit for approval
  • Teams could be 2-5 people
  • You cannot write ANY code beforehand, but could set up your environment, install libraries, etc.
  • Coding starts promptly at 8:00 AM and ends precisely at 4:00 PM
  • Scoring criteria:
    • Completeness: 33%
    • Code Quality: 33%
    • Cool Factor: 34%
    • Bonus: Usefulness to the company: 1-5%
  • Cash prizes awarded to the top three projects.

What a great idea! I was amazed to see what sorts of projects people came up with, and to see the execution of a finished app in 8 hours. Here are some of the apps produced:

  • Use Benford’s Law to detect fraudulent medical claims
  • Use Google’s Prediction API to analyze and score customer feedback
  • Create both a REST service and a web front end for searching ICD-10 codes
  • Text a physician with some notification, differentiating between Protected Health Information (PHI) and non-PHI notifications, and sending a secure link only for PHI notifications
  • Using a microcontroller, bluetooth board, create a light display showcasing our company’s new logo, and create an Android app to control the light show through various light patterns
  • Create an iPhone app that uses the characteristics of a two-dimensional skeleton and learning algorithms to teach a figure how to walk.

I worked on the last item with Michael Privat. The plan was that I would write the piece to take a picture of someone (against a solid background), remove the background, and walk them through identifying the rectangles containing their various body parts. Those images would then be used in the character that learns how to walk. Michael would write the cool, hard stuff: to make the character learn how to walk. We would be meeting in the middle.

I didn’t quite meet him, though. I finished the front end to take or select a picture, store it in Core Data, display a grid of pictures in a UICollectionView, and remove the background from a given picture. I was just starting the UI for selecting body parts when we realized it was 3:30, and there was no way I was going to finish. Luckily, Michael had banged out the algorithm for the learning, walking figure, so we grabbed an image from the Web, cut it up, and used those images. My poor code got the boot.

How’d we do? We took second, losing only to the flashing lights. The panel of judges consisted of several folks from Senior Management (CEO, CTO, CFO, HR VP), Directors, and Managers. Nobody showed code, so the “Code Quality” criterion didn’t have an impact.

Lessons learned? I should have fudged a little and learned how to remove the background from an image beforehand. I found some posts on Stack Overflow, but felt determined to understand them before blindly using them, so I lost some time there. I also had never used the UICollectionView; it wasn’t difficult at all to use, but I still had to learn which delegate methods to override and I could have saved some time if I’d just used a UITableView. Finally, making the users define and rotate rectangles to select body parts was too ambitious, given the time constraints. I should have superimposed a silhouette on the camera and cut the picture at predetermined points. I had a lot of fun, though, and added a few more tools to my belt.

If I were entirely honorable, I would give Michael my half of the $750 second place prize. I’d already told him that I’d be using any winnings to take my team to lunch, though, so I’m making him cough it up.

Kudos to management for this activity–I can’t wait for the next one!

May
2

Why your password can’t have symbols—or be longer than 16 characters | Ars Technica

By Rob Warner  //  Ruby, Software  //  No Comments

Why your password can’t have symbols—or be longer than 16 characters | Ars Technica: “The password creation process on different websites can be a bit like visiting foreign countries with unfamiliar social customs.”

(Via. @lars on App.net)

When I was young, I remembered everything. Now I am old, and I remember nothing. And I’ve surrendered to password madness. I’ve stored all my passwords in safe since 2007, with my encrypted data file in Dropbox, so I can access it from any machine that runs Ruby. This way, I have to remember only one password, which is long and complex and just onerous enough to type that I feel safe without feeling overburdened.

Unfortunately, neither my iPhone nor my iPad can run safe, so I bought 1Password and supplement my safe usage with that. I even use the same onerous password for 1Password that I use for safe, but for some inexplicable reason I used a different password on my iPhone that I no longer remember, so it’s useless to me. I should delete everything and reload, but I’m ashamed to admit I did that once before.

For the website I work on for my employment, we have several different environments with different user IDs and passwords that expire more rapidly than I can type, so I just reset them everytime I log in and mash the keyboard like a Whack-A-Mole for my new passwords that I’ll never remember.

Our new lunchroom food system got smart, though–the automated checkout system eschews passwords for thumb scans. No passwords stand between me and Coke Zero!

Recent Tweets

  • The RSS feed for this twitter account is not loadable for the moment.

Follow @hoop33 on twitter.

What I’m Writing

Pro Core Data for iOS — co-authored with Michael Privat. Click the "Buy from Amazon" button to order!
 
Beginning Mac OS X Lion Apps Development — co-authoring with Michael Privat. Click the "Buy from Amazon" button to pre-order!