Sunday, January 9, 2011

The Difference Between DIV and SPAN

Every now and then I see people wonder about the difference between the DIV HTML tag, and SPAN. Sometimes, people do some trial and error with the two before deciding which fits better for the problem at hand.

So I decided it would be a good idea to clarify this issue.
The DIV element is a "block" element. This means it occupies a full block when rendered, which also means that by default the browser will render a new line before and after rendering the DIV element. SPAN, on the other hand, is rendered inline. This makes SPAN perfect for formatting text which is part of a paragraph.

Want to see the difference? Create an HTML file containing the below code, and run it in a browser:
<html>
<body>
<p>Here goes for span: <span style="color:red" >hello</span> world</p>
<p>Here goes for div: <div style="color:red">hello</div> world</p>
</body>
</html>

And if you're lazy, this is how it looks like:

Here goes for span: hello world


Here goes for div:

hello
world



Makes sense, right?

Friday, December 31, 2010

Free Telecom Reviewed

I guess that by now you've all heard about Free Telecom.

I've been using their SIP services for a while, and thought it would be nice to share my experience with it before things would change in 2011.

So first, I'm an Orange customer, so in order to get the Free Telecom client to work, I need to choose the "IL Orange Internet" access point, as the "3G Portal" access point uses a proxy which blocks non-HTTP traffic.

The client is a bit buggy, but works most of the time, and doesn't seem to drain the battery (compared to other VoIP clients which supports SIP, such as Fring). The SMS UI is nice, and even a bit more useful than the built-in client in my Nokia N95 8GB.

As for call quality: most of the time, when calls are done over WiFi or in places with good 3G reception, the quality is just fine. I'd say it's better than VoIP quality provided by other clients. But, when the 3G signal slightly drop, the call quality drops considerably.
I can't wait to discover whether the quality and service that could be achieved by Nokia's built-in client, outperforms FT's client quality.

The prices are great, and are far cheaper than my plan in Orange. But, keep in mind, it requires a data plan to work out of the range of a WiFi router. So when trying to calculate the total price of a call, one should also consider the price of the data plan.

I guess that things would indeed change in 2011, as Free Telecom got the license to provide MVNO, and this marks the beginning of a new era in mobile communication in Israel.

EDIT: While writing this post, it appears there's an outage with the FT service. I wasn't able to connect to it for a few hours. This isn't not the first time I see this happens, yet it is not very common.

Saturday, December 18, 2010

A burnt fuse

Last week's storm has caused more than a few damages around the country. I saw in the news that some people's cars got smashed by trees, and other people's houses got flooded.

For me, the damage was smaller: My subwoofer died. Or so I thought.
Even though my important power outlets are protected with lightning (electricity peaks) protectors, my subwoofer got damaged after a few hours in which the electricity in my home was unstable.

So I thought "here goes an expensive subwoofer". But I was wrong. A few friends brought to my attention that it is most likely that the subwoofer has a burnt fuse, and insisted that I can replace it by myself. So I tried.

Want to know how? Simple. Have a look at this picture. You can see that straight under the power socket, there's a small plastic box which contains a fuse. It comes out easily, with the assistance of a screwdriver, and apparently contains a spare fuse. Would you believe it? A spare fuse?

Amazing. It was up and running in a minute.
For the next time there's gonna be a stormy weather in our little country, I'm going to disconnect that subwoofer.

Monday, December 6, 2010

Firefox Memory Consumption

Lately I read that people complain about Firefox consuming huge amounts of memory, a thing that supposedly happens due to memory leaks. Many such posts claims Chrome behaves much better with memory.

Well, my experience is a bit different. First, I'm a huge Chrome (and Chromium) fan. I like Chrome's interface, speed, ease of extensions development and its security features (soon, a sandbox for Adobe Flash). But, if there's one thing I don't like about it is memory consumption. Using the latest stable version, opening few tabs with Google's own applications (GMail, Reader, Docs) can easily get the browser to consume 500MB on my PC. Firefox, with only two add-ons installed: Firebug and AdBlock, uses less than 200MB for the same set of sites.

It is true that if one leaves Firefox opens for a few consecutive days, it'll eventually consume all of the RAM installed, but this is not the case for me, as I close the browser at least once a day.

Perhaps the fact that I use the 64bit version of the browsers makes the difference. Perhaps its the fact I have only two add-ons installed on Firefox. I don't know. But I don't complain about Firefox's memory consumption, as it is better for me.

Sunday, November 28, 2010

Web Development Frameworks - The Survey

Usually, When I want to publish a survey, I do so on my Buzz stream. But this time it's different, as I want the broader exposure this blog has to offer.

In the past few years I got to develop web applications using various frameworks:
  • JSP using both IBM WebSphere and Oracle JDeveloper, utilizing things such as EJB and struts.
  • Oracle ApEx.
  • ASP (yes, the original one).
  • ASP.NET using both Web Forms (yuk) and ASP.NET MVC (yay).
  • Django.
I know my list misses two big ones: PHP and Ruby on Rails. But that's not the issue.
It seems to me, just by reading web development blogs, that PHP, Django (or other Python based frameworks) and Rails has most of the web developers' minds. BUT, when I ask people "what framework are you using", I usually get either "ASP.NET" or "JSP". So perhaps I don't know enough people, or perhaps the web development community in Israel isn't connected to the trends. Or perhaps the "trends" aren't trends at all, rather just buzzwords being used.

I can't tell.

So this post is a survey. Please comment which web development framework are you using or used for the last project you had to develop.
Should the number of responses grow large, I'll publish a post summarizing the findings.

Leaving the Cable Company

For some time now I think: why am I paying for the cable company?

Most of the stuff I watch comes from the web, or comes for free. I'm willing to pay reasonable prices for the rest (VOD), but I find the cable company prices exaggerated.

Yet, I couldn't find a good alternative, until I saw Anona TV yesterday. A single product that doesn't cost a fortune, provides DTT, a streamer (I already own a Popcorn Hour device), and has the ability to order VOD shows. Should they over come geographical restrictions (the ability to watch Hulu only in the US), it's going to be a real blast.

Unfortunately, I'm not part of the beta, so I cannot provide a real review of this, and whether it provides the goods, but it does look promising. If anyone knows a way to get into this beta, or knows a different company offering a similar solution, I'd love to hear about it.

Sunday, November 21, 2010

Switching ISP

So finally, after I complained about this topic over and over again, I finally switched from 012 to 018 as my ISP.

Few hours now, and I'm happy. I tried various protocols over various ports, and all seems to work perfectly well. And the price is better, too.

Just a minor thing that I also mentioned to their tech support: their site doesn't provide the configuration details needed in order to set-up the connection alone. Thanks to this guy I found this missing piece of information, which was the L2TP gateway: lns.018.net.il

Hope this would help to all of you who wish to make the switch.