Nevermind, I Figured It Out

Apr
14
2008

This weekend, I was doing a bunch of digging into how to use some of the open source ORM (Object Relational Mapping) packages out there. That process of technical research follows a pretty predictable pattern:

  • do a few Google searches
  • open the best results into a bunch of tabs
  • read the info
  • come up with a few, more detailed questions
  • repeat

As that loop progresses, the questions I end up asking Google get more and more specific. By the time I've been digging for an hour or 2, the bulk of the results are starting to come from forums, mailing lists and other discussions of the technology in question.

That's when one of my pet peeves rears its head. You put a fairly detailed question into Google, get a page from a forum where someone asked your EXACT question (including most of the nuance for your specific needs) and, after a few people saying they don't know how or aren't sure, the original questioner pops back in and says, "Nevermind, I figured it out".

And that's it. Nothing else.

Particularly gnarly questions yield more than one such incident. Even worse, there are often 5 or 6 people just as frustrated, asking this person exactly HOW they figured it out. 

To me, this is an online etiquette and/or karma thing. If you go asking other people to explain how to do something, and you figure it out on your own, telling them "Nevermind" is just the first step. It is now your responsibility to explain back to the forum/mailing list/etc. what you did to figure it out. 

Sure, your solution might not work for everyone who will stumble across the discussion, but it's a whole lot better than being mocked by someone saying they *have* the answer, but haven't shared it.

Beyond Wikipedia: Researching and Exploring Online

Feb
09
2008

Every few weeks I seem to see clusters of discussions about "young people" and technology. Typically, it starts off as I notice someone doing a news story or just spouting off in a restaurant about how amazing it is that "kids today" are growing up with computers/cellphones/iPods and how amazed they are by how adept and sophisticated they are in using those devices.

Nearly always, within 1-2 days, I see another article or just happen to see an incident that points to just how wrong that generalization is. From computers ripe with thousands of viruses and bits of spyware to reports of college professors citing how poorly students grasp the very concept of citing sources and the simple basics of research, examples seem to point to a much more complicated picture.

It's clear to me that there seems to be a segment inside EVERY age group that seems to just "get" technology. Many of the sharpest technologists I know are in their 50's or 60's and some of the most clueless are 16-25. Of course, the plural of anecdote isn't data, but there certainly seems to be enough indication that the full spectrum from tech novice to tech genius exists in nearly all of the age brackets.

One of the criticisms leveled at the non-savvy portion of the younger brackets is how often they will pretty much stop at the first level of Wikipedia when researching a topic. It's so common that many colleges and Universities have had to put actual bans on citing Wikipedia in academic papers.

Given that I was told that the encyclopedia stopped being a valid primary source at some time in 8th grade, this troubles me like it does many others. Wikipedia and Google are starting points for exploring or researching a topic.

I've mentioned before how often I've been asked how/why I know something. That's been followed more than a few times by people asking how I manage to learn as much as I do about the topics that sparked the discussion in the first place.

As I recently used my "normal" process just recently on a topic, I took note of how I dig into a topic and I thought I'd share. This isn't an approach to writing a formal paper/thesis/dissertation. Rather, it's an approach to to satisfying curiosity, getting acquainted with a topic, and getting a dedicated hobbiest level of knowledge in a given topic.

Read the rest of this entry »

Converting MP3 Into iPod M4B Audiobook Format

Jan
08
2008

Back a couple of weeks before Christmas, an unfortunate series of events resulted in my 4GB iPod nano going through the washing machine. And, as is the case with many such incidents, it rendered the device entirely non-functional.

I bit the bullet and picked up a replacement because it's fairly critical to my mental well-being. I need to be able to throw on a bit of music or a podcast when I'm driving or need to drown out the outside world. So, I ordered a new 4GB nano video.

Then, a couple of days after getting that nano and using it, the consulting company that I'm subcontracting through gave all of the consultants on my project a 30GB Zune.

That, of course, caused a quick re-org of my portable media strategy. I ended up making the nano a purely podcast and audiobook device and moved all of my music (and hopefully some video when I get it cooperating) to the Zune.

Unfortunately, revisiting nearly any process in one's life can quickly shine a light on previously ignored problems and make you re-question your solution. Such was the case with my podcasting listening. When I switched over to the nano, I missed the ability to listen at faster-than-normal speeds for spoken word podcasts. However, the other benefits outweighed that downside, so I moved on.

However, last night, I wondered if I couldn't just convert some of those podcasts into iPod audiobooks (the ones with .m4b as the extension). Several of the podcasts already distribute in that format and you get things like bookmarking of where you were in the audio as well as the ability to speed things up.

I'll leave it as an exercise for the reader to guess what I think about a device that allows only the speeding up of a specific class of audio files to the exclusion of other classes of audio files.

Regardless, I checked if the Swiss Army knife of audio/video: ffmpeg would be able to handle it and was happy to see it would. So, I wrote a really simple C# console app to convert these .mp3 files into .m4b files. The workflow is still a bit lacking as it doesn't easily tie in to the iPod/iTunes functionality of putting "the 1 latest unplayed" podcast from each feed on the device, but I can quit hoping that the people speaking would just hurry the hell up.

There were a couple of oddities that needed to be coded around. Most noteable is the proper quoting of file paths (which still might not work in all cases) and the fact that you need to actually convert from MP3 to M4A and then rename that M4A to M4B in order to be done.

At any rate, the code is below the fold if you would like to mess with it yourself. You call it by running

MP3toMB.exe input.mp3 128

It also works if you just drag an MP3 onto the exe by assuming a 96kbps bitrate. Obviously, this is coded for Windows, but the same principle could easily be accomplished on Mac with Applescript or Linux with shell scripting or just batch files on Windows given a commandline copy of ffmpeg.

I've also got a Windows app that combines lots of MP3's into a single audiobook file, but I wanted something that I could use to automate and run on a more nightly basis to convert stuff, which this gives me.
Read the rest of this entry »

HTML as Page Layout Language

Dec
28
2007

Off and on over the last 6-8 months, I've been working on a project that needs PDF as its final output format. The plan has been to use DocBook and the toolchain attached to it. However, that's been more frustrating than it first looked when it comes to integrating into the whole system I'm designing.

Then, earlier today, someone posted a link to this YouTube video, which demo's the functionality of the Prince engine. That revealed a system for really nice page layout using HTML and CSS (with CSS3 handling the page breaks and other stuff like it was designed to, making Prince the only implementation of CSS3 out there that works as far as I know).

Given how my project is web-based, being able to just keep it all HTML from end to end and still get really nice PDF's out the other end would be a huge benefit. And, given how this project will be commercial and how much time I've already spent trying to do all of the conversions back and forth, even the steep pricetag for a server license will likely be a net bargain.

Fortunately, the version that puts a little logo in the top, right corner of the PDF (only for display, not printing) is free for development/personal use. So, I messed around with that a bit tonight and got a feel for it. There are versions for pretty much all of the platforms (Windows, Mac, Linux, BSD, etc.) and integration with code for automatic generation is fairly easy.

Really basic conversion using C# only took 3 lines of code. I just grabbed the normal Windows version, also downloaded the DLL and added that DLL to a basic console app.

Then, these 3 lines work to dump out a PDF of the page in question. I just threw together a quick HTML document to test with a few H1, paragraphs, etc.

IPrince pr = new Prince(@"C:\Program Files\Prince\Engine\bin\prince.exe");
pr.AddStyleSheet(@"C:\Program Files\Prince\Engine\style\xhtml.css");
pr.Convert("demo.html", "demo.pdf");

Pretty easy startup as far as I'm concerned. The video is worth watching, despite being somewhat irritating to watch. Like many presentations to a room full of geeks, there's quite a bit of not seeing the forest for the trees. Lots of people shooting it down by saying, "this is would be REALLY great if it supported my one pet feature" kind of stuff. They got a bit hung up on those little nit-picking details and I wonder how much of their presentation ended up left out as a result.

Based on what I've seen so far, I definitely think it's worth tinkering with a bit more and doing the math on that license fee as part of my project budget.

Software Development and Alchemy

Dec
17
2007

Photo: Stian Martinsen

In several conversations recently with other software developers (yep, those are just as exciting as your wildest dreams) and their frustrations with the process, as implemented in modern corporate America, the same analogy kept popping into my head.

More and more, I feel like the things that businesses are after in their software development are similar to medieval alchemy. For 2500 years, the entire field that eventually became chemistry was obsessed with 3 basic questions:

  1. How can we change lead (or other metals) into gold?
  2. How can we create an elixir that will cure all diseases and prolong life indefinitely?
  3. Can we discover a universal solvent?

All of these strike us as goals that weren't even attainable. Yet, the underlying desires often did get met when the focus shifted to what eventually became modern chemistry. By dropping the focus on the single, universal solution and just figuring out how to treat individual diseases or how to dissolve individual compounds or just fundamentally understand chemistry, many advances did happen.

Many/most of the diseases that the alchemists sought to cure or treat are under control today. There's very little in the world of chemistry that we can't tear apart and we can do things like convert coal or corn into one of the most sought after substances on earth: liquid fuel for transportation.

One of the consulting firms I worked with had a project manager that was constantly pushing the developers to find and use "automagical" tools to build our solutions. What he was after was the kind of IDE or tool that, with a few clicks, would just spit out a nearly complete solution.

That would, of course, result in the sales force being able to sell expensive solutions that could be fulfilled in minutes instead of days and weeks. It didn't matter how often I pointed out that, as a consulting company, if our clients' solutions were so simple that a few clicks and config options could solve them, they wouldn't bother coming to us: they'd just buy the software themselves.

This same person wasn't very excited about things like loosely-coupled systems and/or Service Oriented Architecture unless they also came with wizards that let you choose 4 or 5 options and they'd just spit out a fully-realized application. Yet, those approaches keep working for me as a way of looking for patterns in companies' problems and solving them quickly and completely.

Instead of looking for the tool that spits out C#, PHP, ColdFusion and Ruby, I'm looking for repeating problems like managing queues of objects to be processed. Once you have an approach to that general problem, a good developer can probably implement it in whatever language they're most comfortable with.

That's due, in large part, to the fact that the bulk of the work as a software developer is NOT in typing in the text of the programming language in question. Douglas Crockford said in one of his Yahoo video lectures something along the lines of: a developer could probably type up all of their code for an entire year in a day or 2.

Yet, many of these automagical tools really only seem to automate the stuff related to typing code, not for solving problems. And, like I said a couple of days ago, if you're in the consulting game or just looking to stay employed as a developer, the money and jobs are where the problems are.

That's why, when I hear someone looking for that quick and easy tool that will "just" take care of it this afternoon, I tend to interpret it as, "Can't we just change this lead into gold instead of getting real gold?"

« Older Entries  

J Wynia

For better or worse, I'm the guy who runs things here. I'm a web consultant, software developer, writer and geek from Minneapolis, MN. This site is a fairly wide cross-section of the things I'm interested in and enjoy writing about.

Oh, and if you happen to be looking for hosting for your Subversion repositories or just web hosting in general, take a look at Dreamhost. It's what I use for Subversion and your signup helps me out.

Latest Microposts

jwynia: @geniodiabolico I'm using Mosso for my hosting going forward. I've still got sites on a dedicated server, but it's Mosso from here on out.
jwynia: is eating way too much of the salsa he made for lunch. It's so much better when it's fresh instead of from a jar.
jwynia: @MNHeadhunter I've seen the Recruiters/Geeks passing in the night and missing each other quite a bit. Seems strange.
jwynia: @Cavorter let me know what kind of Windows server setup you need. I might be able to help you out.
jwynia: is back from the rained out Saints game.
Follow Microposts on Twitter | Subscribe to Microposts

My Attendance At the Gym

Feeds and Links


www.flickr.com
This is a Flickr badge showing public photos from J Wynia. Make your own badge here.

Search


Pages

Archives

© 2007 J Wynia. All original content is licensed under the terms of the Creative Commons Attribution license unless otherwise noted. Content from other sources is licensed under its original terms.