Tag: programming
Empirically, I Have No Idea
How We Don’t Know What We Know Previously on Locally Sourced. Who can even remember? Sorry, it’s been a while. I’ve been stuck writing two-thirds of posts and not quite wanting to finish them, but if you are reading this, I assume that means that I finally ended this one. In the meantime, I’ve sold a book-shaped object to Pragmatic that will be about Tailwind CSS. It’s part of the Pragmatic Answers line, which means it’ll be short, and it’s what I’m doing to keep me busy until the Stimulus book is releasable.
BDD: Book Driven Development
(This one is also on the Pathfinder blog, but since it fits in here, I wanted the full text here…)
Jay Fields, who has been posting a very nice sequence of nuts-and-bolts Ruby and Rails guidelines, pauses to talk about creating examples. It’s a topic I’ve wanted to write about here for a while, and this is as good a lead-in as any. Plus, I’m generally interested in how principles of software development apply or don’t apply in odd cases, and software being developed specifically for example purposes certainly qualifies as an odd case.
iPhone SDK
I’m trying to figure out exactly why I’m so psyched by the Apple iPhone SDK announcement. The basic announcement wasn’t a surprise, and I don’t even own an iPhone. I did, however, dig out my Cocoa programming book and start studying.
Further thoughts:
The tools themselves seemed somewhat slicker than what was expected – a lot of Mac developers were pleasantly surprised that Interface Builder was included (although apparently it’s not in the first beta).
Two Pathfinder Blog Posts
Two things on the Pathfinder blog.
Agile Publishing, on publishing experiences and agile methods.
Live Ruby: Testbed, an attempt to work through a small test and metaprogramming problem live and on the blog.
Enjoy.s
More On Test-Driven Development
My first post to one of Pathfinder’s official blogs is up, it’s a companion piece to the blog post here on Test-Driven Development, and you can find it here.
And Now, A Special Announcement
Sorry for the radio silence for the last week or so, but I was waiting to be able to announce this:
Today I started a new job at Pathfinder Associates, as a senior software engineer in charge of Ruby on Rails projects. Needless to say, I’m thrilled to be back in the Web game professionally, and even more thrilled to be working on Rails projects.
Everybody at Pathfinder has been super great so far, and I’m looking forward to doing exciting and fun things.
Didn't I Say I Wouldn't Compare Languages?
I posted a version of this to JJ Behrens’ Blog post about Ruby, and decided it was probably worth also posting here.
I use and like both Ruby and Python, here’s why…
Things I like about Ruby with respect to Python I think Ruby is the only language that gets accessors right. The thing you want to do 95% of the time – simple access – is trivial, and the thing you want to do 5% – something fancy in your accessor – of the time is a pretty easy override.
Programming Perl, Personal Edition
Due to circumstances somewhat beyond my control, I find myself working in the largest Perl project I’ve ever done. Now, I’m not in the least interested in a “my language is better than your language” deal because a) this strikes me as very well covered territory, and b) it seems particularly pointless as the Perl 6 team appears to be doing a nice job of taming Perl’s more rococo features.
An Agile Musing
Of course, since I muse in an agile way, I reserve the right to change my mind based on future developments…
Software development usually takes place in a complex environment where your goal can change quickly. In general, there are two ways to deal with a complex environment. One is to try to anticipate, in advance, every possible permutation you might need to deal with, and the other is to manage your environment with the flexibility to respond to new challenges with minimum effort.
from internet import *
Three posts that caught my eye today.
Ruby School Gregory Brown over on O’Reilly net has an article about using Ruby in Computer Science courses, at least in later algorithm classes. It’s not a bad argument, but I think it’d be more convincing if the Ruby example was a little cleaner and easier to read compared to the pseudo-code.
Let’s see… The last time I had to care about this issue was about eight years ago when my grad institution was going through a somewhat controversial revamp of the CS curriculum.
Comment On This
So the other day I’m looking over some code, and I see this… (slightly paraphrased to protect the innocent – in the original, the declaration and the getter were, of course, separated.)
/\*\* \* The name of the user \*/ private String m\_userName; /\*\* \* @return The name of the user \*/ public String getUserName() { return m\_userName; } And I thought, “I really hope some of that was generated by the editor”
Posting to Blogger via Ruby
TextMate has what seems to be a very nice blogging bundle for programmatically sending posts to your blogging engine of choice. Except that it doesn’t work for the new Blogger API. Or at least it didn’t the last time I checked. Mostly I just wanted to see if I could write my own script to send to Blogger.
This is a Ruby script based on the Python script located at http://djcraven.
GWT part 3 and 4
Sorry for not mentioning this earlier, but part three of the GWT series is now up on the IBM site at:
http://www-128.ibm.com/developerworks/opensource/library/os-ad-gwt3/
This one is about remote procedure calls, and I’m pleased with how it turned out.
I just got the proofs for the fourth and final article in this series, about deployment. I expect it to be online Tuesday, Feb 27th at:
http://www-128.ibm.com/developerworks/opensource/library/os-ad-gwt4/
Clearing The Decks
A collection of small things, half-finished posts, and pure whatnot that hopefully will lead to more posts in the future:
Got my first Amazon affiliate statement with no less than $1.55 heading my way. Thanks to the person who clicked through…
There’s a new sidebar, for small links, via del.icio.us. The sidebar has it’s own RSS feed, on the off chance somebody is interested. UPDATE: It doesn’t appear to work on Safari, which is a problem… Weird, because I did the preview using Safari, and it showed up fine, but not in the actual blog.
Don't Ask Questions, It Only Encourages Him
Let me promote this from the comment section – it’s not hard to find, it’s the only comment on the previous post.
What is your favorite Python IDE? Your editor choices are interesting and valid but I wondered if you have a preffered IDE for Python and wxPython work?
I may have covered this somewhere, either on this site, or in the Python 411 podcast interview. If so, I’m sorry.
Editors I Like
Two tools I use all the time. Neither is free, and since my strong bias is to use free tools where possible, these are some really impressive editors.
IntelliJ IDEA For all my Java needs. It’s got more features and is more usable than any other Java IDE out there. The only downsides are that it’s not free, and there are about a half-dozen keyboard shortcuts you have to get down before you achieve anything like full Zen mastery (well, and it could be nicer about the way it arranges tabs in the editor).
wxWorld
I’m pleased to be able to link to a new article: Build cross-platform GUIs using wxWidgets available on the IBM developerWorks site. The original title was “wxWorld”, and it’s a quick look at wxPython, the wxWidgets toolkit, and some of the other wxWidgets language bindings. I had some fun digging through the different language tools trying to create short wx programs in each. Hope you like it.
Tips-First for Test-First
Of all the exciting ideas and revelations that came from Kent Beck’s original XP book, Test-First Programming has been the one that most significantly affected the way I work on a day-to-day basis.
I love programming test-first. It’s a great way to take a large, amorphous task and solve it piece by piece. It’s also a nice morale boost – “Hey, I know that my code does nine things. Let’s go for ten…”
Why, Johnny, Why?
We interrupt Python week to bring you the following alternative programming rant. I know, Python week has sort of gone up in smoke. But one of our mottoes here is “Whenever a Hugo Award winning SF novelist writes a hyperbolic screed about BASIC in the public schools, 10 Print Hello will be there”. As a motto, it’s not very catchy. We’re working on it.
As soon as I mentioned “Hugo Award winner”, “BASIC” and “hyperbolic screed” many of you were probably able to quickly deduce that the author is David Brin, here on Salon wondering what happened to BASIC (you’ll have to watch an ad to view the article):
Re-refactoring
Here’s a little riff inspired by one of the examples in Martin Fowler’s book Refactoring, which is another great programming book that deserves an appreciation post one of these days. This was actually also spawned by code that I’ve read, and later realized that Fowler did a similar example. Thing is, I don’t think Fowler went far enough in this case.
Here’s the example. (page 243 for those of you playing the home game).
Some 411 of my own
Saturday, Robin and I had the pleasure of being interviewed by Ron Stephens for the excellent Python 411 podcast. I think this was the first time I’ve ever been interviewed for anything, and while it’s always fun to talk about Python, the book, and me (not necessarily in that order), it does take some getting used to.
Anyway, I do mention this here blog during the interview, and while I don’t want to talk about the actual interview in detail until I hear the edited version, it did occur to me that I might want to have some actual Python content on board in case anybody comes by to check the place out.
I/O, I/O, It's Off To Work I Go
Welcome to our program, Things I Agree With Totally And Wish I Had Said First. Our hero tonight is Tim Ottinger with his hit, “Frameworks are for the Impatient". It seems Ottinger is puzzled by a library he’s trying to use..
Look, this framework is not the game Myst. I did not install this thing so that I could amuse myself for days by running around the file system trying to figure out what it is about…
Fonts
I’m curious – how do you set up your screen in your text editor when you are programming?
Based on people I’ve worked with, I seem to do two things in my setup that are unusual. I use fairly large fonts (16-18 point, if I can) and I’m aggressive about cutting off lines at 80 characters. The upshot is that I’m showing less text on the screen at a time than most programmers I know.
Web Apps and Language Wars
I wasn’t planning on posting about either web apps or linking to Joel Spolsky again, but this language wars post is just too interesting to pass up. Besides, a jillion people have already commented on this, so what’s a jillion and one?
Spolsky is riffing on what language or platform you should use for an enterprise web project. He makes a few points (note, I’m paraphrasing him here – these are his points, not mine):
Java Closures
Here’s a nice item being proposed for Java 1.7: closures in Java. On behalf of all those people who actually do create entire classes just to be able to use map and other functional styles in Java, may I say, please, please, please put this in Java. (This seems a good place to link to Joel Spolsky’s wonderful programming fable “Can Your Programming Language Do This").
The proposed syntax looks like this:
Languages I Use
Continuing in the getting to know you kind of vein, I thought I’d ground some of what I say by talking about the three programming languages that have made up the bulk of my professional and hobby work for the past five years or so – Java, Python, and Ruby.
Java: I’ve been programming Java since either just before or just after the 1.0 release… can’t quite remember at this point.
Code Complete: An Appreciation
It’s been about 25 years since I first typed 10 PRINT “HELLO”, and in that time I’ve read dozens of books aimed at making me better at creating software. There are several things I want to do with this site, but certainly one of them is to recognize those books that had a particularly strong impact on my professional career.
The first one is Code Complete, by Steve McConnell. It stands out on the shelf because it’s not about learning a new language, tool, or discipline, and it’s not a big picture rethinking of software engineering itself.