Archive for November, 2008

Checking for Empty Strings

Ok I know s.Length != 0 is faster but I still say s != “” is more readable …

Mandatory DataKeyNames

Always, but *always* set DataKeyNames on a ListView, if not you may end up with weird errors when editing etc.

1 Million Dollar Programming Competition

You don’t find each day such a high prize for an algorithmic contest. Basically all you have to do you is to write an algorithm to give better movie recommendations :) , you have a huge dataset of movie-related data to play with. Sounds fun and I may give it a try …

Two Internet Connections, One Default

It seems that Windows has the default gateway the last public interface that was enabled, now, this is ok except that sometimes Windows shuts down the non-default internet connection and then re-enables it when a connection is coming – thus changing the default outgoing gateway …

Http Text Streaming for Chat

I managed to code a J2ME chat using a http connection that stays open, however there are few more problems: the database is polled to retrieve the new conversations and worse on IIS 6 I can’t stop the page when the connection is closed (IsClientConnected stays true)!

Passive FTP Range with Port Mapping

If you want to forward a range of ports on a Windows Server with RRAS, the only way to do it is:

FOR /L %I IN (5001,1,5201) DO netsh routing ip nat add portmapping name=”Internet” tcp 0.0.0.0 %I 127.0.0.1 %I

Interesting Linq Discussion

Here on DataLoadOptions implementation. I’m debugging a website and it seems that indeed in some cases DataLoadOptions works faster, in some cases it doesn’t, I just can’t find any explanation.

Also sometimes with Linq it may be faster to have many small queries to load the related child data than a single query using join, no idea why as it’s the same data in the end.

Interesting New Course at UPB

At last, a real-world web course, made by UberVU, Adobe and Yahoo.

iPhone Developer Program Enrollment Keeps Forever

Ok, what the hell ? I’ve applied like 3 months ago and still no word from them. But why am I surprised, one of my friends have applied since the start of the program and still nothing …