Integrated, or just sharing data?

0 comments

Fifteen minutes before every meeting my...

...cell phone vibrates
...Outlook blinks
...iPad beeps
...gmail sends a reminder
...gchat widget alerts me about the email
...phone beeps again from the email

Every 30 minutes it's like one of those scenes from a disaster movie when all the press corps' cell phones ring during the president's speech. You'd think there was a major happening, with the number of alerts firing. Except it's just me, alone in my office.

It's great having my Outlook, Blackberry, and Google calendars all synching with each other, but I'm realizing that sharing data is not the same thing as being integrated.

Peeking Under the Hood

0 comments

At car shows, the hoods are always popped and the engines are clean, shiny, and presentable. My car's engine is not. Most people do not polish their engine blocks because most people will never have a gaggle of strangers peering under their hood. And so it is with my code.

I hold my code to a higher standard when writing something for a blog post, a presentation, or documentation. When there is the possibility of really, really good programmers I've never met reading over my code, I fuss over it considerably more than I do when writing application code in some dark corner of a project.

Clearly this isn't ideal - I should do my best work all the time. But I'm wondering how bad it is, and how common it is. I hold the formatting of my resume to higher standards than most other documents I create because total strangers will infer a lot about me from that one page. I'm being similarly judged by other developers based on a small sample of my work. So it's a natural response to polish code that I know will be used to judge me, but the fact remains that I'm doing my best work for total strangers, not for my development team and that makes me very uncomfortable.

Can anyone out there relate? Is it even possible to overcome such a self-conscious instinct?

There are Two Sides to Everything

0 comments

Today, in the Unites States, if an immigrant entrepreneur starts a successful company but his Visa expires (s)he is forced to leave the country. The Startup Visa Act promises to solve that problem by providing Visas for foreign founders. BusinessWeek explains it thusly:

"The StartUp Visa Act would create a new type of two-year visa, called an EB-6, available to any immigrant entrepreneur who has secured at least $250,000 in capital from accredited venture capitalists or angel investors. After two years, the person would become a permanent U.S. resident if his or her business has met one of three criteria: created five full-time jobs in the U.S., raised an additional $1 million from investors, or achieved $1 million in revenue."


Seems like a no-brainer, right? Of course we want to retain talent that creates wealth, jobs, and innovation. Venture luminaries like Fred Wilson, Paul Graham, and Brad Feld all support (or in Graham's case, originated) the idea. The idea has even begun successfully navigating its way through the gauntlet that is the US legislative branch. Who could possible object to such a thing?


But there are two sides to every story.

As this well-researched, articulate, and thorough piece in Business Insider explains, there are a number of consequences to the current incarnation of the bill. I encourage you to read the whole article, but in short, the proposed bill would put foreign founders at the mercy of vaguely-defined "qualified investors", relying on the amount of money raised as the primary metric for Visa eligibility.

I'm not sure where this leaves the act. The problem it's trying to solve is real and should be addressed, but the solution may not be as straightforward as we had hoped.

Guaranteeing Inconvenience

0 comments

Windows Vista (and Windows 7) installs updates that require a restart when you shut down. The thinking by the design team here is obvious - the user is shutting down anyway, why no install updates now instead of forcing the user to shut down an additional time just for the updates? Seems logical enough.

Yet totally incorrect.

The reality is that I almost never shut down my laptop. I put it sleep, or log out, but only rarely shut it down. When I do shut down, it's because I need it to turn off: I'm getting on an airplane, or I'm leaving the house for an extended period of time. But I can't just shut it down - Windows wants me to install updates first.

So I can't put my laptop away and I end up at the back of the B line on Southwest, and thus in the middle seat for a three hour flight.

Windows shouldn't install updates when I want the computer to shut down for the simple reason that, at that time, I want the computer to shut down, not install updates. Windows should choose to install updates when I'm not using the computer at all, in the middle of the night. It should be smart enough to figure out when I'm not using it and install updates then. Putting updates where it does, Windows guarantees that I will be inconvenienced.

Apple Builds Bundles of Sensors

0 comments

I heard an analyst on NPR this morning (I listen to a lot of NPR) complaining that the iPad was not the category-defining device that it could have been and that some were expecting it to be. He took issue that the device didn't have a killer social networking app - that there wasn't a compelling reason for grandma to buy one. He was expecting a communication marvel - he expounded on scenarios where families caught up with each other across time zones by sending pictures, video, and notes from a magazine-sized tablet. The iPad, he claimed, was not this device.

Why? Why is this not the iPad? Because it doesn't have these features out of the box? Everything the analyst described (except the lack of a camera - a void 3rd party vendors will happily fill) was software functionality, not hardware. Though Apple most definitely makes software, their mobile devices are increasingly just piles of sensors for developers to use as they will. Like a canvas before it's been painted, the iPad (and the iPhone and the iPod Touch) are just blank slates waiting for developers to make them dance. The iPhone in particular is a great example. It's almost a challenge to developers. Apple says "We are giving you a device with:

  • Bluetooth
  • 3G
  • WiFi
  • Microphone
  • Camera
  • Compass
  • Touchscreen
  • Accelerometer

Now what can you make it do?"

The defining feature of the iPhone was not the hardware (as pretty as it was at the time), it was the App Store.  It was the software. Why should the iPad be any different?

New Features

0 comments

"Nothing we have ever done at Fog Creek has increased our revenue more than releasing a new version with more features. Nothing. The flow to our bottom line from new versions with new features is absolutely undeniable. It's like gravity...When a new version comes out with new features, we see a sudden, undeniable, substantial, and permanent increase in revenue."
-Joel Spolsky

Parsing Quoted Fields in a .csv File in SQL Server

2 comments

For a project recently I had to import some .csv files into Microsoft SQL Server. Normally this is a piece of cake to do with BULK INSERT as below:


BULK INSERT MyTable
FROM 'C:\FileCreatedFromThisFunction.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)


But in this case it wasn't so easy. My comma-delimited file had some fields that were inside of quotes, and those quoted fields sometimes contained commas. Even more problematically, sometimes my quoted fields contained "" - escaped quotes. An example row below:


USA,1,1/21/10,"""FORWARD!"",George Washington cried",6


Incredibly, though Excel handles this flawlessly, SQL Server totally chokes. It's even documented that it chokes. From MSDN:

To be usable as a data file for bulk import, a CSV file must comply with the following restrictions:
  • Data fields never contain the field terminator.
  • Either none or all of the values in a data field are enclosed in quotation marks ("")

The only solution I can see is to write a text processor to replace delimiting commas with a new delimiter - one that will never appear in the quoted text. I've written a short vb.net WinForms program I call "ReDelimIt" (clever, I know) to do just this.

Caveats:

  1. The code is terribly ugly and poorly organized (but at least it's commented!).
  2. Will not handle a comma+space as a csv delimiter. There cannot be spaces after the delimiting comma.
  3. There may be weird edge cases that this doesn't cover, but it has worked for me in many real world scenarios without issue.

That said, without further ado you can download the program here.

I have posted similar code to Stack Overflow here. Feel free to vote it up if you find it useful (hint hint!).