ASP.NET Repeater Alternative Item Markup Optimization Sep 30, 2010

Another post for ASP.NET/SQL developers reading this blog. If you think these posts do not belong here, please leave a comment, and I'll consider moving my development articles to a separate blog.

Sometimes when you use the ASP.NET repeater control, you utilize the "alternating item" template. And sometimes the alternative item's design is only slightly different from the regular item. So a huge part of the HTML-code is just being duplicated like this:
<ItemTemplate>
  <tr class='regularItem'>
  <!-- lots of code -->
  </tr>
</ItemTemplate>
<AlternatingItemTemplate>
  <tr class='alternativeItem'>
  <!-- lots of THE SAME code -->
  </tr>
</AlternatingItemTemplate>

Here's a great simple tip that shortens the ASP.NET repeater control markup by 50%:

<ItemTemplate>
  <%# Container.ItemType == ListItemType.AlternatingItem ? "<tr class='alternativeItem'>" : "<tr class='regularItem'>" %>
  <!-- lots of code -->
  </tr>
</ItemTemplate>

As you can see, instead of creating a separate AlternatingItemTemplate just to change the class name, you can determine, what item is it - right inside the repeater control markup.

Looking forward to Business of Software 2010 Sep 24, 2010

I never had a chance to attend to the Business of Software Conference before - an annual event organized by Neil Davidson, joint CEO of Red Gate Software. I'm across the ocean, so, you know, I've always had my excuses not to go.

But after reviewing videos from the previous conferences, reading lots and lots of positive reviews... Well, just looking at the speakers list is enough. That's just not something you want to miss. Joel Spolsky, Dharmesh Shah, Seth Godin, Eric Sink - to name a few.

This is going to be awesome. And not just because of the speakers:
  1. Attendees. You get a chance to "rub shoulders" with the most passionate, creative, experienced and like-minded dudes in the industry. From large corporations to small startups coming from all-over the world, even Brazil and Russia are in the list. All the people I feel privileged to meet
  2. Networking and business-partnering, not just rubbing shoulders. Maybe even starting-up a brand new venture with a new partner, who knows.
  3. Autumn is the best time to see "New England" - the city of Boston and the states of Massachusetts and NY. I recommend you rent a car and go spend a couple of days in the Adirondack mountains or The Cape after the conference - just to digest all the great info you got. Cape Cod is pretty quiet and deserted this time of year, so you can stay at a 5-star ocean-view resort for a reasonable price and put your thoughts in order.
See you in a week!

How Gaming Affects Your Productivity and Why Is It Awesome Anyway Sep 22, 2010

A friend of mine, who's also a geek and "digital entrepreneur", has described himself as a "PC-gaming junkie" and asked me to write a post on the "how gaming affects productivity in a negative way" topic.

Well. Actually, that post title has been lying in my drafts for a loh-ong time... Until I realized that gaming is actually good for your business.

I love games. I'm an addict, actually. I almost got expelled from the university because all I was doing was playing Quake-2 online. And not just on my free time - all the time.

I still play PC-games, action-shooters and rally-sims mostly and... well it does affect my productivity in a negative way.

But.
  1. Games make you smarter. Games improve decision-making, especially fast decision-making. This is a scientific fact now. Games train your brain to react fast.
  2. Running a business is just like a game, especially running an online business. Geeks, have finally found a dream job for the - we do spend all of our time in front of a computer, improving our "pet's" characteristics here and there (RPG). We build new "facilities", sometimes with the help of external "units" (RTS), we even buy "magical items" and services and join "clans". We make tactic and strategic decisions all the time, we learn tips-and-tricks from "gaming gurus". We react fast in case of emergencies and trying to solve the puzzle as fast as possible. And I can't tell how many times I heard this phrase from a startup founder - "hell yeah, let's conquer the universe!"
  3. Fun is great. After all, isn't "having fun" - the thing we make money for? I mean, after saving money for our kids' education and paying our rents we all still have that little kid inside, worth spending some money on. That little Barney Stinson who loves playing laser tag.

    Trying some off-piste snowboarding on Chilean glaciers. Playing your favorite PC-game on a XXXX-inch monitor. Taking a motorcycle ride across the continent. Then another continent.


Twitter best practices for small biz owners #2 Sep 21, 2010

Continuing the previous article on how to benefit from your Twitter account, here are some more little tips for small business owners:

  1. Don't be too personal, don't make that mistake I made. No one's interested in your breakfast menu. Unless you're a celebrity. Which you're not. Still - it's OK to post some thoughts on your favorite TV show or, say, Star Wars. Everyone loves Star Wars, right? What? No?

  2. Choose your posting time - business hours are best. I mean US business hours. No reason for us, Europeans, to be offended, since 40% of all Twitter traffic comes from the US. So save that gem in your "drafts", don't post it right away.

  3. Same applies to your blog postings. And you do send blog updates to your twitter account right?

  4. Track mentions. Twitter is a "public" conversation with your customers so track mentions, track your product names, respond fast and stay polite.

  5. Narrow down your niche and stay in it. Don't be "everything for everyone" - funny vids, jokes should be an addition, not the core.

Abandon unsuccessful projects [Mistakes I made #1] Sep 10, 2010

This is the first post in the "Mistakes I made" series, where I share the "donts" of my startup experience.

One of the valuable lessons I've learned is - give up on failed projects easily.

I have bought a project once - a PC security utility, developed by an Eastern European company. I thought I could market it better than the founders, find new niches for the product, polish the interface, add more features etc.

Long story short - I failed. Couple of months later I even discovered that it had serious compatibility issues with Windows 7...

But I couldn't let that money go. I kept redesigning and promoting the website. I kept hiring freelancer programmers to deal with the Windows-7 bug (it required some hardcore C++ and WinAPI knowledge that I don't have). I desperately wanted the project to pay for the spendings I threw in it, so I threw even more. But what I really should have done - is close the project. And stop trying to cure a dead creature.

There's no typical criteria, like "if there are no sales within a month - stop it". But there's always a point, when you can tell a failure from a... slowdown. Our web-based help desk was not making any sales for months after the release, but we always knew that it would at some point. It's just a competitive market to be in, we needed more features, more marketing...

Eventually there are ways to benefit even from abandoned projects: by making them free and attracting some "link juice", for instance. So, have the guts to let go. "Failure should be your greatest teacher, not your undertaker."


Blog Archive