The Boring Programmer; "It's not easy to reconcile the fact that the software we write each and every day is, for all intents and purposes, mind-numbingly boring. Magazine subscription management. Medical billing reports. Realty inventory management. This is not the type of software that changes the world. In fact, it probably won't even put a smile on someone's face. Its sole purpose is to add to the bottom line by making other workers be more productive."
Boring development, done by bored programmers is always easier to maintain.
I decided to try and integrate my flickr feed into the blog somehow. After some cursory looking around it seemed using the
Flickr Services and the
flickrapi was the simplest way to achieve that. While this open style of API might enable Web 2.0, the cloud, and all other manner of new uses, for me I just wanted to put
my latest flickr uploads on one page on my blog.
I used easy_install to put the flickrapi library on my dev machine and ISP's server. I got the api-key from flickr and since I haven't changed my user id to something more human readable it was a simple find as well.
# get the list of photos from flickr
def get_flickr_photos(self):
flickr = flickrapi.FlickrAPI(self.flickr_api_key, format='etree')
photos = flickr.photos_search(user_id=self.flickr_user_id, per_page='50') # comes out as the _ElementInterface
# parse out the XML and return an array of URLs
# http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{secret}_[mstb].jpg
urls = []
for image in photos.getchildren()[0]:
img = {}
src = 'http://farm%s.static.flickr.com/%s/%s_%s_m.jpg' % (image.attrib['farm'], image.attrib['server'], image.attrib['id'], image.attrib['secret'])
url = 'http://www.flickr.com/photos/%s/%s/' % (self.flickr_user_id, image.attrib['id'])
img['src'] = src
img['title'] = image.attrib['title']
img['url'] = url
urls.append(img)
return urls Turned out to be simpler than I expected. The hardest part was working out what the hell I was getting back, Python interfaces can be quite opaque to what data they are carrying. I finally found ElementTree.toString(_ElementInterface) so I could see what I was getting and how far down it I had to drill to get the information I wanted.
You can see the results on
the photography page. I made it permanently accessible by the camera icon at the top of the page.
Cagdas Basaraner has a list of twenty best practices for software engineering. My list of best practices would be slightly different and more aimed at ensuring high quality software;
- Use a source control system
- Use a continuous integration process that compiles, unit tests and if possible integration tests on each check in.
- Unit Tests. Without unit testing you cannot guarantee the code at its lowest level does what the function/method says it does.
- Integration Tests (or functional tests as we call them). Without integration testing you cannot guarantee the functionality works as the GUI, DOM, public API, Webservices or Remote Interfaces say they do. These tests will also shake out issues with the database, third parties, or transactions.
- Descriptive classes, method names, and variables to minimize the need of commenting code. Naming is very important and can dictate how another developer will interact with the code.
- Software minimalism is good. Write less code. Make methods smaller so they only do one thing. Don't nest if statements. Only write as much code as is needed and don't design ahead for possible future needs.
- Use RuntimeExceptions unless a checked exception makes sense or needs to be explicitly communicated through the API to a developer using it.
- Commenting code is valuable when it explains why something coded that way. The code should say what a method, or a variable does and not need a comment.
- Never check in commented out code.
- Never check in broken unit tests.
- Always leave the code in a better state - ie, higher quality - than how you found it. That means must be unit tested, must be functionally tested, descriptive method, class and variable names and commented where necessary.
- If you are stuck on an issue for more than twenty minutes ask for someone else to help you. We often ask, "Can I borrow your pair of eyes on this please?" Usually another person looking at the issue will point out something minor thar is causing the block, or the process of explaining the issue will lead to an ah-ha! moment.
- Design important pieces with other developers so that the most efficient mechanism is sketched out. Do it as informal chat around a computer if possible.
- Avoid formal meetings like the plague. Sometimes they are important, and those that are should be attended, but 99% of the time they are a complete waste for everyone involved and productivity sapping.
The first four are essential for guaranteeing quality. I suspect more and more of the software process will be automated and it will be software developers writing these automated processes. Already in the space of twenty years we have gone from writing automated tests, to entrenching them into the development process with continuous integration and more recently into the publishing process with continuous deployment.
The best two software engineering books I have read that had direct impact on the way I work are:
Those two books are translatable to work the very next day. Anything read from them can be applied immediately.
When an Exception is named eee you know something is wrong;
try {
...
} catch (Exception eee) {
...
} The reason? Because of this;
try {
...
} catch (Exception e) {
try {
} catch (Exception ee) {
try {
...
} catch (Exception eee) {
// swallow exception
}
}
} Naming is important and gives insight into what a variable is and what it is being used for; sometimes the naming is give-away as to an anti-pattern appearing as well.
Most Popular on South Sea Republic
The articles that have been viewed the most:
Most Popular Restaurants in Phoenix
Phoenix Eats Out is the restaurant review site for
Phoenix,
Scottsdale and
Old Town Scottsdale which lists the modernist and contemporary restaurants, taverns and bars in the greater Phoenix area.
This is the list of the most popular restaurants pages from phoenixeatsout.com that have been viewed the most;
My personal favourite restaurants in Phoenix are
AZ88,
Postinos,
Bomberos with
Grazie,
Humble Pie,
Orange Table,
The Vig,
Fez and others coming close behind. View the complete list with the photo-journalistic style images on
phoenixeatsout.com
Most Popular Hikes in Arizona
Arizona is an outdoor state and has lots of hiking in the city and around the state. Phoenix is unusual for most cities in having several large mountains in the center of the city with great hiking. Anyone who comes to Phoenix has to do the
Echo Canyon trail on Camelback and the
Summit Hike on Squaw Peak or Piesta Peak. The views of the city, suburbs and surrounding mountains are wonderful from Camelback and Piesta Peak.
For more experienced hikers there is the McDowell Mountains in North Scottsdale that has several difficult and strenuous hikes in
Tom's Thumb and
Bell Pass. Alternatively, you can hike the highest mountain in Arizona. At 12,600 feet
Humphrey's Peak is a long and difficult hike.
Alternate Australian Constitutions
Between 2004 and 2009 this site,
southsearepublic.org, was a constitutional blog based on scoop which focused on Australian and global constitutional issues.
One of the strongest aspects of it was the development of constitutions by those involved in the blog. These constitutions are the outcome:
The constitutions were built using principles from Montesquieu's separation of powers, the enlightnment's universal political rights and the ancient Athenian technology of sortition and choice by lot.
Archives For South Sea Republic
South Sea Republic started in 2004 as an Australian constitutional blog in 2004 based on scoop software. It was an immigrative outgrowth of Kuro5hin. The archives for each year since then;
The articles are ordered by views.
Who Is Cam Riley

I am an Australian living in the United States as a permanent resident.
I am a software developer by trade and mostly work in Java and jump between middleware and front end.
I originally worked in the New York area of the United States in telecommunications before moving to Washington DC and
working in a mix of telecommunications, energy and ITS. I started my own software company before heading out to
Arizona and working with Shutterfly. Since then I have joined a startup in the Phoenix area and am thoroughly enjoying myself.
I do a lot of photography which I post on this website, but also on flickr. I have a photo-journalistic website which lists
the modernist and contemporary restaurants in phoenix. I have a site on the
Australian Flying Corps [AFC] which has been around since the 1990s and which I unfortunately
lost the .org URL to during a life event; however, it is under the
www.australianflyingcorps.com URL now.
The AFC website has gone through several iterations since the 90s and the two most recent are
Australian Flying Corps Archives(2004-2002) and
Australian Flying Corps Archives(2002-1999) which are good places to start.
Websites Worth Reading
Websites of friends, colleagues and of interest;