Code Poet, Swordsman, Eternal Wanderer
Please feel free to comment
Email: james AT jameshollingshead DOT com
Monday, June 26, 2006
I’ve said it before – I like Perl. It’s a useful language for doing some things. I think it’s used by too many people for things that it shouldn’t be, but then most languages are. It’s not my choice for a main language, but it does some things pretty well.
That being said, I have to say that I’ve been playing around with Ruby a bit more lately, and I’m starting to like it better than Perl. There are two main reasons for this – the first is that it’s a lot more cross platform than Perl is. You can actually use it on Windows without fear of strange quirks (O’Reilly makes Perl on Win32 for a reason). Second, the syntax is a whole heck of a lot more readable.
Okay, so regular expressions still look like my cat ran across the keyboard, but they always have and probably always will. For the rest of it though, Ruby’s object oriented nature makes the code look a whole lot less complicated, and the less time I have to spend trying to figure out what an app does, the more time I have for solving problems. I like being able to do things like call somearray.length to get the length instead of trying to assign the array to a scalar in order to get how long it is. It just makes a heck of a lot more sense.
Let’s face it, Perl is probably the only language in the world in which you can roll your head across the keyboard and then watch the resulting script compile. There’s no guarantee as to what it will do – for all you know before you run it, the script may end up causing a rift to open at your feet from which emerges Huang Ti along with a standing field army of terra cotta golems animated by the spirits of the soldiers that were under his command when he was alive (if this confuses you, don’t worry. It’s sort of an inside joke. Though if you’re just wondering who Huang Ti is, he was the first emperor of China). Then again, it may do no more than the program I wrote once when I was 21 after I had been out with some friends for the weekend (it compiled, but I have no idea what I was thinking when I wrote it), but the chances are that it will compile.
In all honesty, I believe that there is a reason Larry Wall, the creator of Perl, has won the International Obfuscated C Contest twice.
Perl, you have been useful, and I may still end up using you on occasion, but I think that, for the time being at any rate, Ruby is going to become my choice as far as scripting languages go.
Current mood: neutral
Current music: Michael Hutchence – Slide Away
Monday, June 19, 2006
It’s official – I have relinquished all of my final responsibilities at o3 Magazine.
Since stepping down as executive editor in February, I stayed on board as an editorial advisor for the last several months, but the time has come to pass the reins to someone else.
It was an interesting trip, and I wish them the best in the future. As for me, my own path lies in a different direction.
(I should also point out that this has nothing to do with the previous post. That situation arose because of some things from the past in my personal life coming to my attention. It happens to the best of us.)
Current mood: calm
Current music: Shades Apart – Beat by Beat
Sunday, June 18, 2006
The last couple of days have been filled with introspection and looking at things from my past.
The people who know me well enough know some of the things in my past that I wouldn’t tend to wish on anyone. For the rest of you, let’s just say that it’s been an interesting trip filled with a lot of rocks (nothing illegal or that I feel like I need to hide – just things that I don’t tend to want to think about or discuss with people that weren’t involved).
While I am mostly at peace with the things that have happened over the years and the person I have become, I am reminded of the quote which basically states that behind every cynic is an idealist who wonders what the hell happened.
I admit it. I used to be an idealist. I even used to smile a lot more. Now, I tend to be something of a hopeful cynic and quite a bit more reserved.
Hopeful cynic? Isn’t that a contradiction in terms, you ask?
Not really. It means that while you hope the outcome will be better than you expect, you don’t bet on it. Just because you try to avoid the obstacles doesn’t mean that you think you’ll always succeed.
I don’t give up. I just expect that, at certain points, I will likely have my head handed to me.
But right now, I’m at the point of wondering what the hell happened even though I already know the answer. I think that sometimes, just sometimes, we have to spend time thinking about that sort of thing in order to make it anywhere. The trick is to not to be consumed by it – looking into the abyss, as Nietzsche would have said.
Current mood: contemplative
Current music: Erase the Grey - Rain
Thursday, June 15, 2006
It’s been an interesting last couple of days.
The weather was beautiful yesterday, so I decided to spend some time training at the lake – just me, the wind on the waves, and my jian (Chinese straight sword). It felt great to have some quite time and get some exercise all at once. I paid for it later though =]
It’s been way too long since I’ve trained regularly, so after about 45 minutes, my right arm felt like jello. This is not a big deal. It just means that I need to be more active again. I can deal with that.
Today’s amusement, however, comes in the form of email. Being in a smallish town that doesn’t have a great deal in the way of tech companies, I found a couple that were actually listed on the chamber of commerce’s website, so I wrote to introduce myself. I don’t know many people here in town and meeting people in my field is quite often a positive thing.
The first one’s owner and I seem to get along pretty well and are supposed to have lunch soon. The second one, however, was a whole other story. I send a basic “hi” email and get a “what do you want” type response, so I say that I just really kind of want to get to know the other technical people in the area and get a response of “I don’t give out information about my company” that suggests he thought I wanted to take over his business, but that if I wanted to send him my resume he’d look it over and decide if I fit anywhere in his organization.
That amused me. I just kind of sat there and looked at the screen for a minute. First off, I wasn’t trolling for a job. Secondly, I wouldn’t want to work with or for someone who behaved in a manner that paranoid and unprofessional. I don’t need the headache.
I told this to my friend and he joked that the guy probably thought that I was attempting industrial espionage. I’m just waiting to get a visit from the FBI now – especially since my resume contains the word “subversion” (as in the source control tool).
And just to go completely off-topic for a moment – why the heck is the sci-fi channel showing wrestling now?
Current mood: amused
Current music: Flogging Molly – Black Friday Rule
Wednesday, June 14, 2006
It seems as though Lucent has seen fit to close down Bell Labs and will be moving the remaining employees to various other locations. The building itself, which holds a great deal of technical history, is to be sold off and all expectations are that it will be demolished.
This makes me sad.
The city in which it is housed says that it doesn’t want to have the property turn into just another subdivision. I can agree with this. In fact, I think it’s sad that the Labs are closing their doors at all. However, the stated reason kind of annoyed me – the city gets millions in taxes from the property and has to deal with very little in the way of upkeep costs for infrastructure because the property is a largely pastoral setting. They don’t want to build and maintain infrastructure in order to get their tax money.
Guess what – that’s their responsibility. They need to deal with it.
One of the main bidders for the property wants to turn the property into more office space while supposedly maintaining the pastoral nature of the setting. They have a reputation for renovating existing factory, etc space into office space, however in this case they want to tear down the building because they don’t think that any tenants would want to buy offices there.
Am I the only one that thinks it sounds weird that they believe nobody would want to have space in a building which gave birth to some of the greatest technological breakthroughs of the last century?
As for Lucent, I don’t understand them. They bought the Labs for the R&D that they do. They then proceed to cut the legs out from under the whole thing (only about 1,000 people work there now compared to something like 5,000 in its previous days of glory) and now they want to carve it up and ship it off to other places that are “more in keeping with the size of corporate headquarters.”
In my personal opinion, they are making a huge mistake. Part of the reason that Bell Labs was so successful was that you had a huge number of extremely intelligent people all in one place working on things that interested them. This let them bounce ideas off of each other without any problem at all. In fact, from what I understand, it used to be extremely common for people to just sort of get pulled into projects as a natural matter of course instead of being assigned to them.
That makes a very fertile environment for innovation. The fact that it was in a pretty, relaxed location just makes it even more conducive to the kind of thought and work that they did. It’s really hard to innovate under pressure and in surroundings that feel hostile.
Take that away, and they’re just going to be sticking smart people in random, unfriendly office space and the innovation will definitely suffer. I see this as a very bad move.
I know what some of you are thinking – but all offices are sort of impersonal. Cubes are the order of the day and our people seem to do just fine.
Cubes are the order of the day, but they shouldn’t be for any place that does innovative work or work that requires actual concentration. Cubes were made for one purpose – to save a few dollars on office space. Believe it or not, even the guy who invented them now thinks they weren’t such a great idea.
They’re fine if all you do is talk on the telephone (sales or call center jobs), but for things that require quiet (say R&D or programming), they’re just a really bad idea.
They’re loud, they’re too open to the outside world (which causes distraction), and they’re generally extremely cramped. They’re also extremely impersonal (even to the point of some companies having policies that you can’t decorate them at all).
I can hear it now – “So what? They’re not supposed to be personal space. They’re supposed to be workspace.”
Wrong. The “workplace is not personal space” idea probably came about with the industrial revolution. Prior to that, craftsmen worked in spaces that they generally had a great deal of control over. This means that they had things laid out just the way they wanted and in ways that made them more productive.
It is extremely difficult to be productive while doing complex tasks if you are in a location which you are not comfortable with. Every moment you spend thinking how unsettling your surroundings are is a moment that you can’t focus on the problem at hand (though some might argue that the surroundings are the problem at hand. I happen to be one of them).
As far as the “cost savings” of cubes goes, ask yourself this – how much would it cost you for actual office space with real walls? How much are you paying for this “open office plan” crap you have now? Now, with those numbers in mind, think of how productive your staff that would benefit from offices is now. Now, think of how much more productive they would be (and how many fewer mistakes they would make) if they did not have to deal with the distractions of the rest of the cube farm.
It’s kind of like R&D (getting back to my original point) – it’s not necessarily cheap, but it more than pays for itself in the long run. Stop living quarter to quarter and make long term plans.
Current mood: contemplative
Current music: Verve Pipe – The Freshmen
Monday, June 12, 2006
The Saga of Thunderbird
Or
How I got a 17 Page Sig
This is where we see how I work through a trivial problem occuring in a trivial project for an equally trivial purpose. The journey, for me at least, is amusing.
I’ve been bored with my simple mail sig for a while, so I thought about writing a script to rotate the quote that appears below my contact information.
No big deal, I thought. I’ll just script up a sig file maker. Thunderbird should have no problem dealing with the output of a script as the sig, right?
Well, not really.
This is a Windows system, so I decided to write the script in Ruby. If you haven’t used Ruby, it’s a handy language in the vein of Perl and other scripting languages. The main reason I decided on Ruby instead of Perl is that Ruby has a really good implementation for Windows that works exactly like you’d expect it to and Perl can have some quirks in Windows (not for anything this simple, but I use Perl for *nix and I’ve started using Ruby in Windows).
My script, when it began, consisted of a few things – an array of strings that is approximately 17 pages long (I have a lot of quotes), a puts statement that outputs my contact information, and a line that outputs a random quote from the array.
After finishing the script, I change my account settings in Thunderbird to use the script, thinking that it would just take the output and use that. Stupid assumption on my part (and I honestly admit that). It took the whole file as a sig. That’s right – I had a 17 page sig.
Just what everyone wants – 20k of quotes tacked onto the end of a less than 1k email.
Next, I try explicitly launching Ruby and feeding it the script in my account settings. This, not surprisingly, doesn’t work either, but it was worth a shot.
Well, that’s not going to work, so after thinking for a second, I decide that the next best thing would be to have a new sig for every time Windows starts. This being the case, I try to add the script with the output redirected to a text file (which Thunderbird will read correctly) into the startup routine for logging on to Windows.
Can’t do that. Windows doesn’t like having the re-direct as part of the shortcut.
So much for the quick and dirty way. Time for the almost as quick and not quite so dirty way.
I go back to the script, make a line to open a file, take out the puts statements, replace them with write statements that write to the file, and close the file.
It now works, Windows runs it on startup, and I have a new quote for my sig when I want it.
What’s so funny about this? That’s how I was going to do it in the first place, but I thought I’d save myself a tiny little bit of typing by doing it the “easy” way.
Consider it a lesson learned. Or should I say a lesson re-learned since we all seem to have to go through this one once in a while.
Hey, at least it was on a quick little project instead of something buried deep inside a complex program.
Current mood: amused
Current music: Dirty Vegas – A Million Ways
Sunday, June 11, 2006
To whomever has used my domain name in their return address for spam emails,
I’d love to find you so I could beat you to death with a large, heavy blunt object.
I check my mail today and find 50+ “returned” emails from addresses that have bounced. None of the addresses I saw were ones that I had ever emailed in the past and the email addresses that were listed as being from my domain don’t exist.
Thinking I may have been hit with a worm for the first time ever, I run a scan. Four hours later, I find that the machine is completely clean. Yes, it takes this laptop four hours to run a full antivirus and spyware scan because of the insane number of files on it even though it’s a 2.4ghz machine.
So basically, this cost me ¼ of my day so that the only thing I could do here was read or watch television because it was raining and unpleasant outside.
Current mood: annoyed
Current music: Yellowcard – Lights and Sounds
Subscribe to:
Posts (Atom)