phone: 732-581-6826
email: dpirek {at} gmail.com
ICQ: 236139496
my: LinkedIn
my: facebook
7/15/2008
I have been wondering how to marry jQuery with the namespace concepts often used in the Object Oriented JavaScript development approach. In the passed I would just wrapped my jQuery binders to a namespaced function. Recently, I have seen another approach to namespacing the initial jQuery plugins itself. I suppose both of these approaches do not exclude each other, but can coexist. Depending on the complexity of your code you may choose one or the other.
7/11/2008
There is an alternative to the clearfix. I thought this was the final CSS trick I would ever use, but just discovered a new one. Here is an example how to create a simple 2 column layout without running into the problem of not clearing the tags.
<style type="text/css">
body{ text-align:center;}
#wrapper{
width:800px;
background-color:#ff0000;
position:relative;
margin-left:-400px;
left:50%;
float:left;
}
#left_col, #right_col{ float:left; width:400px;}
</style>
<div id="wrapper">
<div id="left_col">
<p>test</p>
</div>
<div id="right_col">
<p>test</p>
</div>
</div>
6/25/2008
Recently, a friend of mine mentioned an interesting SEO strategy which I will call "piggyback SEO strategy." This is what you do: you pick a major domain name of a web site that is in the same market, and optimize your home page on that keyword. So for example: you have a dating site, and in the title of your page you put: "www hotornot com". Place this keyword a couple other times through out the page, and watch what happens after your page gets indexed. The truth is that a lot of people use google to navigate everywhere. Another friend of mine was telling me recently who amused she was when she saw her mother googeling yahoo.com.
I have in fact tested this piggyback SEO trick. In order not to commit a major breach to google's rules, I have actually build a feature of my professor's rating site oznamkujucitele.cz and calling it "the parody on hot or not" where students can upload the images of their professors and rate them much like on the "hot or not" type of websites. The result was that a couple months later, I did see the major traffic spike; however for some reason it did not last too long. Oh well, back to long tailing now :)
6/23/2008
As I have am working on my Czech Social networking site, I have come across an interesting challenge: how to create Emoticons in ASP.NET. I come up with the solution, so I would like to share it.
The core is a very simple loop function that replaces sets of characters, with another set:
Public Function Emoticons(ByVal strCharString As String, ByVal strCharSet As String) As String
Dim arrCharSet(30)
Dim arrCharCouple(2)
Dim i As Int32
arrCharSet = Split(strCharSet, ",")
arrCharCouple = Split(arrCharSet(1), " ")
For i = 0 To arrCharSet.Length - 1
arrCharCouple = Split(arrCharSet(i), " ")
strCharString = Replace(strCharString, arrCharCouple(0), + _
"<img src='" + ConfigurationManager.AppSettings("EmoIconsPath") + _arrCharCouple(1) + "' alt='" + arrCharCouple(0) + "' />")
Next
Return strCharString
End Function
Next, put the pair set in the webconfig file:
<add key="EmoIcons" value=":) regular_smile.gif,:-) regular_smile.gif" />
<add key="EmoIconsPath" value="images/emoticons/" />
And lastly, this is how you can call this function from within, let's say the repeater control:
<%#Emoticons(Container.DataItem("comment_body"), ConfigurationManager.AppSettings("EmoIcons"))%>So here is what it looks like in action on the fungu.cz forums' page.
3/23/2008
Some time ago, I have read an interview with Mark Zuckerberg that was focused on how facebook.com develops their code. There was a line that especially caught my interest. Mark mentions that one of the important factors that try to observer when developing new features for facebook is that keep the code flexible enough so that the developers would be able to modify it based on the business needs. This is something that I have also learned in my entrepreneurial endeavors: It makes no sense trying to make your application all perfect and finished before you show it to people. This is especially true if you develop for communities, because you will rarely be able to know all the needs of the community and the design stage, so long and polished development cycles make very little sense.