web developing
3 Sep
As we all know most of the cases a program execution time depends most from the input data. As I wrote in my post the degree of the input data estimates the algorithm complexity.
Of course 3*n² is a bit faster than 5*n², but in general both functions are similar and have the same complexity. In this case we tend to say that the size of the input data is n.
It is easy to bind this to arrays or other simple data structures. For example when sorting an array with n elements, the size of the input data is n, but sometimes there is not such an obvious relation between an algorithm and the size of the input data.
For instance when we’ve to search a path into a graph, than maybe the best way to describe the input data is by summing both the number of vertices and the number of edges.
However this is important when dealing with algorithms, because a mistake in the estimation of the input data size will result in wrong algorithm estimation at all
25 Aug
Here’s yet another example of the JavaScript flexibility. You can simply call .replace() on every string and pass a regex as a parameter!
var str = 'my simple string'; str.replace(/ /g, '-'); // now 'str' will contain 'my-simple-string'
23 Aug
I’m sure this is not the first time you’ve been asked this question. However there’s nobody today that doesn’t wonder the answer. For me – yes, twitter can replace the RSS feed readers, and NO – feed readers are awsome!
First of all why do I use a feed reader? I’m simply seeing what’s in it and barely read the article from the reader, but rather I jump to the site, and what’s happening often in twitter is the same scenario, I just see what’s in the tweet and if it seems to be interesting to me I jump to the link (if there’s a link). The good thing is that the tweets are limited and I’m focused. That’s why twitter is my favorite social site. I can follow all of the interesting people I know from their blogs. So perhaps twitter is becoming more useful than the feed readers.
In other hand in twitter you’ve to stay all the day long to get all the tweets you need. The timeline is quickly changing and sometimes you get lots of “junk”. While in the feed reader you’ve all the “important” posts as an incoming mail. You cannot miss anything! That’s why I cannot forget the feed readers they are doing a great job!
4 Aug
How do you estimate your work?
Do you rely on a previous similar tasks or simply by some intuition? It will be interesting to share your experience.
3 Aug
Somehow the <base> tag remains unknown to most of the web developers, but that’s quite normal. However let see what it can do. By adding the <base> tag in the head of the page you tell every link into that page how to open and a default href value. Thus if you have:
<base href="http://www.stoimen.com/blog/">every link without a href attribute will open this link. That’s really useful in some cases. However the most interesting part of the base tag is the target attribute.
Everybody knows what will result from this attribute attached to a anchor tag.
<a href="http://www.stoimen.com" target="_blank">Click Here</a>
But with only adding this base tag:
<base target="_blank">into the head … all the links will open in a new tab/window, depending on the browser preferences.
If you add the line above somewhere into the <body> tag the browser, will put it into the <head> which will make it difficult to track. A good practice is to place it directly into the <head>!