Posts tagged: programming

Why I look down on coding (and why I’m completely wrong about it)

beautiful machines.jpgI live in a funny world. My company, which is composed of several disciplines in the manufacturing, industrial design, and, yes, programming space, is one factor. I sometimes see people screw together contraptions in our workshop, and I see coders banging away at their PCs and Macs, and I wonder what the hell I am thinking calling programming low or high tech. There are different degrees to everything and just like metal and a few screws can lead to an amazing creation, so lines of code produces the amazing virtual reality I interact with most of my days.

This will be a short post. I think that the Internet has proven to be a two sided coin. It brought us freedom of information, but bits are also information, which makes it hard to gain value from them. Looking at it through a business lens (a flaw of mine) I can’t help but wonder if programming is a worthwhile direction to take, if you want to make money at least.

The other side is what I wrote about in paragraph one. Code produces wonderful things and I am grateful everyday for the fruits of that labour. So I sincerely hope that my world, the business world, will continue to allow for “the code” to reign free, and for those that produce code and its products, to reap the rewards and continue to do what they love.

So I apologise for whatever I wrote previously, namely that software is not high-tech, i.e. innovative, because it simply does not apply to all code (just to the 100s of 1000s of me-too apps and websites out there, which ruin it for the good ones).

This post was inspired by Fred Wilson’s post “Code As Craft” and by one of our interns producing “beautiful code.”

Confessions of a Closet Programmer

Previously on this blog, Vincent talked about learning Java. That reminded me of this post that I had kept as a draft for a very long time. It’s more like a (really) short story, though. I guess it just a love story about Ruby and perils of having too much time on your hands.

I have a confession. I recently wrote a program, or maybe it’s just a script. I’m a bit ashamed to confess this, because it serves little if any purpose.

You see, one group of my friends hang at this irc-channel where they post occasionally funny links. The problem, of course, is that you’d need a connection to IRC to see what’s going on in the channel and IRC is usually blocked at any public or work access points. It’s also a pain to keep track of all the links unless you’re online all the time, 24/7.

So, having some time on my hands, I started writing a little Ruby program that would parse the irssi logs for all links and publish the latest ones as an Atom/RSS feed. Thanks to the open source movement, it was easy to find a library, atom-tools, that would do the heavy lifting of writing out the XML of an Atom feed. I decided writing the regular expressions to parse the logs was enough so I could say I had actually done something myself.

It was fun. And I got to use Transmit and love its feature-I-now-can’t-live-without Edit With <editor here>.

“Why Ruby?”, you might ask. Because it’s the only language, which syntax I remember and to which I remember where the documentation is (thanks RDoc ). Publishing this little gem (in figurative sense, not as a ruby gem) on my friend’s server pointed once again the blocking problem of Ruby. My friend’s Debian box had an outdated version of Ruby and when I finally (okay, it took a day after I hinted about that) got him to update that it was still missing IRB (Ruby’s interactive shell). Debian doesn’t like rubygems, so I had to add atom-tools library the hard way. Running the script on Apache through something like mod_ruby or mod_fcgi or something? I chose to run the script as a cron job instead. Deploying my little ruby script was a pain. Had I written a php, python or perl script I would’ve no doubt avoided some of the obstacles, but my main idea was not to actually have a script converting irssi logs to feeds, but enjoying writing a program, i.e. coding.

But I wasn’t satisfied after the script started to write out every hour the latest links on our irc-channel. There were so many features I could add to it! I could make it so that instead of just linking to an image, it could also display the image as inline content! I could make it better! I could make it faster! I have the technology!

I wasn’t satisfied with the code. It wasn’t poetry, but the source was still… ugly. I wanted to make little classes out of everything. Make it more general and modular. To give rhythm to the code. (I blame myself for reading The Ruby Way).

I was over-engineering. The script was done. It did what I had wanted it to do. But I wasn’t satisfied, I wanted more. There were still bugs to fix.

If you have a burning desire to parse links out of your irssi logs with Finnish dates in timestamps, the code is available … at request.

Beware! Dummy learning Java!

running with Java.jpg

Discipline is the mother of all innovation…!

I’ve decided to dedicate one hour per day to learning Java. If I remember correctly, Jeremy did something similar, but I’m not sure it was for this language. Reasons for doing this are:

  • A good intro-language for code-dummies like me!
  • Built to be cross-platform: not only PC-wise, but on mobiles as well (I plan to write about the latter in a future post).
  • Plenty of resources around (more in this in a sec)!
  • The intellectual challenge!
  • Necessity: remember my last mantra?

After looking around for resources, of which there is no shortage, I’ve decided on a three-pronged approach:

  • A lecture-series, by Swinburne University of Technology, entitled “Object Orientated Programming” (free on iTunes U)
  • A book, called “Head First Java, 2nd Edition,” which got good reviews on Amazon, and is co-authored by Kathy Sierra. The lecture above recommends, “Core Java, Volume 1,” which I have to see whether that would make sense to get, in order to follow what they are saying.
  • Exercise-tutorials, to learn the basics, of which there is no shortage online. I am currently a third of the way with the tutorials on Javaomatic, and will see what happens afterwards.

Since I don’t like working solo on things, I think a logical next step is to take part in projects where I can practice my l33t haXing skillZ as well as contribute on the business developmental side.

My questions to the audience are:

  1. Where do you stand on Java as a language and as a standard? Personally, I have yet to come across a Java-app that I actually use day-to-day.
  2. What is the one Java app that I should check out to inspire me!?
  3. How easy is it to build on top of Java and learn/use other languages? What web-languages are most related to Java (yes, I am aware that Java could be a considered a web-language also)?

Enjoy the weekend!
Vincent

P.S. don’t forget to answer our poll !!!

Staypressed theme by Themocracy