Valuable Photos

An acquaintance of mine spends a lot of money on travel and cameras, more than just about anyone I know. But you won’t find photos of famous landmarks amongst his pictures unless he’ll find a way to take a picture of something that nobody photographs – like a bathroom or a service entrance. His photos will stand the test of time.

Collectors of old photos know this: photographers have a herd mentality. In early photographs portraits are very common, but pictures of anything other than people are rare. Yes, old cameras were bulky and hard to use outside, but it’s still not a good reason: the earliest surviving photo is a view out of a window.

There’s a type of a photo that I despise the most: one of a flower. If you have an expensive camera with a nice lens you can go to a botanical garden and take a hundred gorgeous pictures of pretty plants with a pretty blurred background (coin-a-sewers of this type of photos like to discuss “bokeh” – the quality of the blurred background specific to a lens).

And then there’s one type that I like a lot: pictures of workspaces. My advice to you is to take more of those. Forget flowers, sunsets and landmarks: looking back you’ll enjoy these much more.

Here’s a blurry photo of my doorman’s desk from college years:
Screenshot 1:8:13 7:26 AM

And here’s my desk at TV Guide.
Screenshot 1:8:13 7:06 AM

A co-worker of mine kept a picture of his old workspace instead of anything else. He could never explain why he did it, but I found it funny enough to take a picture of it. I always kind of wished I had the foresight to keep taking pictures of my desks recursively – which is a great idea, I think.

Screenshot 1:8:13 7:00 AM-3

I, for one, welcome our new social overlords

Disclamer: I thought that Google Wave was an excellent idea, so you can safely disregard my blathering here.

Here’s what I’m picturing in my head: Google has approached Facebook and Twitter on the playground. Twitter stole a piece of Facebooks lunch, but can’t really hold onto it. After a few threats and a bit of running around and a few ineptly thrown punches Google got itself into position to really clean Facebook’s clock and take its lunch. Foursquare and Groupon which earlier evaded Google’s punches in the most ebarracing for Google way possible are likely to be lunchless later. It is rather strange that Google does not go after scrawny TV Guide and White Pages – it looks like their lunches are not that tasty.

Yes, it’s just another social network. Yes, Google has a track record of failing fast and frequently (which if I remember correctly is a “good thing”). But remember, a bunch of incompetent coders received such an applause, press coverage and a whole evem some money to build a Facebook alternative. And finally mighty Skynet is doing the same thing. I think the company behind the mighty Skynet and the future parent of our robotic overlords has a chance against a bunch of compiled spaghetty PHP.

P.S. Zuckerberg and his approach to privacy creeps me out, so I have deleted my Facebook account and turned it into a blank account used only for work (writing Facebook apps, testing and such). I’m completely fed up with the character limit on Twitter – it’s nothing more than a feed from my blog. But I do want to share photos, and I do want to post shorter, non-blog-worthy thoughts. I’m really rooting for Skynet here.

8 Pieces of Architectural Advice for CMS

I have some advice for those in the business of building large websites with content management systems.

1) Do not implement search yourself.

Your CMS sucks at search, and so do you. I see this again and again and again. Everyone is implementing search on large websites instead of using Google. Developers are afraid of looking unprofessional. Managers are answer yes to the question “do you want advanced/faceted search” (the correct answer is no – user’s don’t like it and don’t use it). As a result a lot of resources (both server and developer) go into implementing something that Google is awesome at. Even some very smart people, like Jeff Atwood roll their own search, and their users end up going to google.com and typing “foo site:stackoverflow.com”.

Users are very happy with Google CSE, and don’t mind the text ads. Those text ads – well, that’s revenue that you would otherwise would not have, however small this is. If you absolutely can’t do Google CSE – buy their search appliance. If you can’t do that either – well, you better be using Solr.

2) Do not implement comments yourself (unless comments are what you do for a living).

It is extremely difficult to get comments right. Users absolutely abhor comments. Spammers – well, they love it. Luckily, you can just go and get DISQUS to do all the heavy lifting for you. The time saved on using DISQUS can be used on building something else, meanwhile users absolutely love leaving comments through it, while spammers hate it.

3) Physically separate your admin interface from the stuff that is going to be used by your users.

Maciej Ceglowski has some words of advice about not having your blog hacked: cache your output in flat files and hide the admin interface. The benefits of this are tremendous: cached files are fast and secure. You will need to do some fancy footwork to serve up parts that change a lot, but you can do it the same way DISQUS and Google CSE do it – through the magic of AJAX.

4) Sanity check: calculate the amount of RAM in the home computers of all of your interns. Compare that to the amount of RAM in your server farm. Who wins?

5) Use a CDN and/or caching proxy, don’t be cheap. These things will save your butt when Yahoo and Digg will come a-knocking at the same time. I’m not even going to mention Memcached – you can’t get big without it at all.

6) Fight WYSIWYG editors. These things are the worst. They are the Devil. They are a security hole. You never get what you see. People paste from Word. Do I need to go on?

The best middle of the road solution is something like Markdown.

Do not underestimate the user’s ability to learn a few simple rules. When I worked at TV Guide there was this movie database application. Very non-technical editors were using a very scary-looking Unix-based interface at an amazing speed. When I rewrote it as a web interface, it became more “user-friendly”, but they could not enter stuff as fast as before.

7) Make sure you have good backups

8) I know you won’t be able to follow my advice, I know I can’t either. Life is a constant compromise.

Semi-literate Programming

I recently finished “Coders at Work“, a series of interviews with famous programmers.

On one hand, reading a book like this is a downer: it’s very clear to me that I occupy a place that is very close to the median of the bell curve, and the skill level of programmers is a very steep non-linear curve in itself. I’ll never be as good as JWZ or Brad Fitzpatrick. But I knew that before, and I am ok with it. On the other hand, this book inspired me to read more code.

The programmers in the book disagree on many points, but they mostly agree on the importance of writing readable code and educating yourself by reading other people’s code. I make my living writing in scripting languages, and I haven’t written a line of C or C++ since college. But there’s nothing preventing me from downloading and taking a look at the source of Apache, PHP, MySQL.

It’s important for me to understand “how the sausage is made” in the PHP stack, and as it turns out, what happens between Apache PHP and MySQL in term of requests and timeouts is not as simple as one might think. I asked at StackOverflow about this, but all the diagrams that people pointed me at were of the very rudimentary type: “look, here’s a happy cow, it goes to Bovine University, look – it’s all shrink wrapped on the supermarket shelf” instead of “sausage farm/slaughterhouse/truck/factory tour, starting with cow insemenation”.

When I downloaded the source code of mod_rewrite, arguably the most useful Apache module in the world, I was amazed to find out that it’s only 5000 lines of C with comments.

The book ends with the interview of Donald Knuth, and another two major questions that the interviewer is asking everyone is – “have you read Knuth’s books and have you tried literate programming”. It was interesting to find out that most of the famous programmers use Knuth’s the same way that I do. The books sit on my bookshelf, I look at them, I sometimes try to read them, I skip most of the math. They serve as a constant reminder to me that I suck at computer science even more than I suck at programming, and luckily there are people out there who know all of this stuff who are not idiots like me.

Here’s a photo of my cubicle at TV Guide circa 2002, Knuth’s books are holding a place of honor next to the mini fridge. By the way, taking pictures of the places where you work and live is something that you should not forget to do: years from now nobody will care about those pictures of flowers, shadows, and sunsets, but

I’ve read the book about Literate Programming at the time, and was rather inspired by it. Ok, maybe I didn’t read it and more like skimmed it. I don’t think I understood what real literate programming is.

The way I understand it, Literate Programming is a way to write programs as a narrative that is readable to computers and humans. My father, in his former career a site supervisor (a type of a contractor) is very fond of giving very detailed instructions to me, the same way he used to give instructions to construction workers. His instructions usually are exaustive algorithms, with error handling. I think that his instructions, expressed as a flow of conciousness, would work not only on me and construction workers, but on computers as well, and are similar to what Donald Knuth has in mind. All you really have to do is to build a layer of abstraction between these instructions and a computer language. Also, since computers don’t forget things, he would only need to repeat his instructions once.

These days my dad is a COBOL programmer. Everybody dumps on COBOL, but in my mind it’s a language worth of a lot of respect. It has a syntax that is very English-like, something that makes reading COBOL code easy. Well, maybe it’s like reading some old-timer’s newsgroup post written in all caps, but it’s still much closer to English than most other computer languages.

At the time I was reading “Literate Programming” I was using ASP 3.0, IIS, and SQL Server 97. My task was to write a system that would account for booked and pending business. This is something that had to be done since the age of Mad Men. You see, the dealings of clients, account executives (like Pete Cambell), their bosses, account coordinators, creative department, etc are rather convoluted. But in the end, to get paid, you have to have a system that will track who brought in what business, who handled what, and how the commissions need to be split.

This is normally the realm of something called EAS (Enterprise Application Software). Back at the turn of the century, this area was still dominated by a company called SAP, but there were a few smaller players, like Salesforce.com that tried to package these applications. Any sane IT manager looks to see if an EAS solution can be purchased first. It turned out that TV Guide’s buseness logic was impossible to shoehorn into any existing solution. SAP folks said – yeah, no problem, we’ll build you what you want, but our prices start at $1M, and then there are consultant fees. ERM world is a crazy place, you can read about some true craziness in “Cube Farm”, an account of one hapless developer’s adventures at Lawson Software. It’s a truly riveting book, and I fell that every developer out there should read it. It’s literally Lovecraftian in nature, that book.

In any case, it fell to me to develop the application from scratch. Inspired by Knuth, I decided to write some semi-literate code. Me and a project manager, Brad, went to the clients and interviewed them at length, documenting their existing process (aka the most complicated set of spreadsheets you’ve ever seen). In the past, before cheap computers, all you needed was a Joan Holloway, but I believe they stopped making them.

Brad went on to go back and forth with a very terse document about 5 pages in length that described how the new system would work. He would sit down with the clients and go through the narrative, step by step, confirming that this is what they wanted. Meanwhile I created an object oriented library that made dealing with the database, creating forms and navigation elements much easier. This is similar to to what you might find in a CMS like Drupal, only a little cruder.

When the document shaped up, I created the database schema, and then I took a big chunk of the document and pasted it into one huge comment block. I proceeded to break off chunks of that block and writing the code around it. Interestingly enough, as time went on, the project manager started helping me to write the code: enough of scary database abstration was hidden by simple classes and method, and there were tons of self-evident examples all around to copy and paste. I switched to writing reports that involved cubes, rollups and other fancy stuff. Stored procedures that did the reports also received comments from the document that described the reports.

This wasn’t a monolythic system – I was writing it for 2 years or so, releasing a chunk after chunk. In the end it was handed off to another developer, the whole transfer took only a couple of hours. There weren’t any major bugs, maintanence issues (I believe I received only one phone call about it after several years of continuous use). All in all I was pretty pleased with this approach and can absolutely recommend it.

I believe this is the reason why so many English majors become excellent programmers: if you can write for people, you can write for computers. Sometimes there are reasons why you can’t do both at the same time, but there’s no reason not to find some middle ground.

LibraryThing

When I attended a party thrown by Joel Spolsky at his apartment, I got to browse through his library. Joel’s library was somewhat bigger and better organized than mine, but with a significant overlap: on almost every shelf I encountered at least several books that I already had or had in my wishlist.

Keeping a large library is something that I feel a little guilty about. Living space is precious and books take up a lot of it. One of my livejournal friends told me that he does not keep more than a small bookshelf of books at home (although he reads more than I do). Once he’s done with a book he either sells it at Half Price Books or gives it to a friend or acquaintance.

So why do I keep all the books? Besides the obvious vanity: look how sophisticated and edjumacated I am, there are other, more subtle reasons. When I was little, my father had an even bigger library. It was a great: exploring hundreds of books right at home was a great joy. My bed was located right under a huge bookshelf – if I wanted some bedtime reading all I had to do was to stretch my hand.

Joel put it best that evening: he feels that if somebody would read all the books that he has read, that person would start thinking similarly. A library is a sort of a mind dump, a memex chain. It becomes a part of who you are. Giving my library up would be extremely difficult for me. Call it the collector’s instinct, a fetish – it does not matter. Some poor people just are attached to physical books.

One of the reasons I got a job at TV Guide was because at the time it purchased two most promising eBook companies, NuvoMedia and Softbook. It thought that the electronic revolution would finally happen and we’d be reading from small electronic tablets, like on Star Trek. I do love paper books, but the promise of instant gratification and the library in a chip that was promised to us so long ago was even more tempting.

Sadly, the two companies were deprived of resources and smothered. I still think that the tablet reader is in our near future, and the Sony eInk tablet is a step in the right direction, although I am so displeased with Sony for a number of reasons (about which I’ll rant some other time) that I refuse to buy any of their products. In any case, my former co-worker Martin Eberhard, the founder of NuvoMedia (maker of the more successful and practical RocketBook) is now building awesome electric cars. I really wish I had a chance to interact with him at TVG — I share his fascination with Tesla and world changing technologies.

Since the ebook revolution is not coming any time soon, I finally decided to do something about keeping my books organized and joined LibraryThing. LibraryThing is a great online tool that allows you to create a catalog of your books by either typing in an ISBN number or book title. The interface is super usable. To make cataloging even faster I dug out my good ‘ol CueCat that I “declawed” back in the day. Seeing how crappy it was, I broke down and bought a real usb laser barcode scanner off eBay. It works like a charm – there’s a rotating laser inside and everything. Indeed, you get what you pay for.

I simply scan the barcode (if there’s one) or type in the title, add a tag that contains a shelf number – and that’s it. Now if I need to find a book I can simply search for it and find out which shelf it’s on. I don’t really need a more exact location. So far I’ve entered about 250 books. This covers the kitchen, bathroom and a couple of shelves in the living room. Altogether I have 2 Ikea Billys in the living room, 2 in one bedroom and 3 in another. In my estimation there should be at least 2000 books in my library, although a friend of mine thinks that it’s more like 1000. We’ll see who’s right once I’ll finish the catalog. My friend estimated (conservatively) that I spent about $5 per book, so my books must have cost me $5-10K. I feel kind of like Carrie from Sex and the City who had about $40K worth of Blahniks in her closet.

Dreamblog: Having a Ball

Two nights in a row I had dreams about attending balls. The first dream had me hanging out with Count Pyotr Andreyevich Tolstoy in 1700s. This is pretty easy to explain — I am reading a book about the Tolstoys.

This morning I had another dream, where I was at a Newscorp ball at the Hilton and talked to Rupert Murdoch. He completely agreed with all the things that I proposed to be done at TV Guide and I woke up very pleased with myself.

Modernism, Postmodernism and the Voice of the People

“It’s the combination of narcissism and nihilism that really defines postmodernism” Al Gore

I am a man with huge gaps in education. Every time I think about all the history, philosophy and literature that I should be familiar with, I shudder. Take, for instance, Modern Library List of Best 20th-Century Novels. Out of the top 10 I olnly read numbers 4, 5 and 10.

By the way, Modern Library editors did not understand the web enough to run a poll for a reader selected top list. Of course, the list came to include 4 Ayn Rand and three L. Ron Hubbard titles, with two top spots going to “Atlas Shrugged” and “The Fountainhead,” and third to “Battlefield Earth”. I am a bit surprised to see the Objectivists defeat the Scientologists, but I guess they’ve heard about the vote earlier and mobilized their forces ahead of time somehow.

A similar “vote” happened on the TV Guide website once. The poll was run to determine the most annoying Star Trek character, and early on Ensign “Wussley” Crusher had a good lead on the competition. That was until Wussley’s alter ego, popular blogger Wil Wheaton, asked his readers to stuff the ballot box. Funnily enough, both wilwheaton.net and tvguide.com have the same PageRank of 7, so he had more than enough readers to rig the vote. I don’t remember who won and I can’t really look it up because in its recent redesign TV Guide broke most of the old urls (one of the reasons why its PageRank is so low).

Anyway, I really wanted to talk about the top Modern Library novel, Ulysses by James Joyce. I must have started this book 3 times, only to get stuck a couple of pages into it. I’ll have another go at it sometime, but I am afraid I am not smart enough yet to tackle it.

One thing that leads me to believe that there might be a day when I’ll enjoy Ulysses is my growing appreciation of the Modernist movement. Even though the contents of the book elude my understanding at this moment, I really like the dustjacket created by E. McKnight Kauffer and book design by Ernst Reichl. Just because of the dustjacket design I paid $15 for this book many years ago, when I usually refused to pay more than a buck for a used book. The elegance of the form and color, the expressiveness of the simple type elements is lightyears beyond the current, and I guess what should be called “Postmodern,” cover.

The funny thing is that “Modernism” is not modern at all. We are talking about books, architecture and music that is at least 50, and some times almost 100 years old. What comes after Modernism? Postmodernism. Honest to God, it looks like our society is running out of naming ideas. What do you name a language that comes after B? C. And then? C++. What comes after Generation X? Generation Y. Then? Generation Z.

The latest poll is about Wesley Crusher.

TT: Though Tally :: Gratuitous Linkage And Stuff

I’ve got a postcard from Eritrea. writes that there is no television and no radio there, but he had 3 different people asked him if he had a copy of TV Guide to give them. God knows I have a sizable stack of them here in my cubicle. :) It’s so nice to get a postcard. If any of you want a postcard from me, email me your address. It’ll probably be one of my photos.

is so much better than . Check out this amazing photo. I wonder what their story is.

A deep philosophical question from : “The Triple Chocolate Meltdown…is that chocolatey?” (The comments are hilarious too. “I like vegetables, but what’s in the chicken vegetable?” – another deep philosophical question.)

My High School chemistry teacher was absolutely sure that drinking a half liter bottle of vodka would inevitably lead to alcohol poisoning. Well, of course it depends on a person, but I know a lot of people who can handle a bottle. Three bottles in a short period of time is rather deadly of course. is pretty good.

The Great Blackout Of 2003

For the first few hours I was pretty busy trying to find my wife and photography wasn’t on my mind. After talking to a doorman at the building where she works I realized that she couldn’t find me she took a bus to Brooklyn, I tried to relax a bit and took some pictures since there wasn’t much else I could do. I did not do anything except cropping and adding a border to these photos.

“Fair, Balanced and Hot”:

At this point I missed an amazing shot of cooks from a Japanese restaurants carrying home whole plates of sashimi ingredients, but got this:

Live entertainment in front of the Newscorp building.

I haven’t seen so much drinking in the streets and smelled so much pot smoke in my entire life.

Give my regards to power grid engineers.

Atlas Shrugged.

Unsuccessfully trying to catch a bus to Brooklyn in total darkness. The battery in my camera died and I missed absolutely amazing shots of a religious Jew reading Torah with a flashlight and of a police Segway. Stupid as I was, I was taking pictures without recharging my camera for about a month.

Later I joined some of my coworkers back at the office. Executives shared contents of their fridge (I didn’t even know it existed) and stores of promotional items. We found blankets, t-shirts and, amazingly, TV Guide branded flashlight radios. Who knew those could be useful? The radios in the flashlights didn’t work, but we found TV Guide branded radios that did. We had a little slumber party. I shared my antacid tablets with TV Guide president. In the morning we got home via car service provided by the company. Woo hoo!

I think I should go on a little survival shopping spree. I definitely need a high quality police scanner and maybe long range walkie-talkies. A red Photon light was very useful, I should get a few more of those. Need to stock up on batteries. Oh, and I definitely need to buy some black bakelite phones. Those worthless piece of crap wireless phones don’t work in a blackout of course.