How to Loop through the Properties of an Object in JavaScript
for (var key in object) {
alert('value of '+key+is+object[key]);
}
for (var key in object) {
alert('value of '+key+is+object[key]);
}
I’ve posted a tutorial on how to get wireshark up and running on Ubuntu. The one problem , though, is that sometimes (actually often) you get [truncated]. How can you untruncate or turn it off or increase its size.
This isn’t the answer, but a way of how to get access to the full response:
Right Click on the Packet in Line-based text data, then choose Copy > Bytes (Printable Text Only).
This will place the full response, and you can paste it in a text editor.
One of the most annoying issues using Vodacom to connect to the internet is that sometimes the DNS server used is so badly rotten, internet use is practically useless.
DNS is the system that converts a domain example www.google.com to an IP Address, something ‘computers’ can interpret and understand. When this process fails, it may appear the internet is down. All that is happening, however, is that the process of converting domain names to IP Addresses is slow (or dead).
One way to fix this is to use alternative DNS servers/addresses. By switching DNS addresses, you are basically saying, use this server to convert domains to IP addresses.
First things to check:
- http://41.1.224.101 (vodacom.co.za)
- http://41.203.21.136 (mybroadband.co.za)
- http:// 196.8.95.20 (standardbank.co.za)
- http://74.125.43.106 (google.co.za)
If this works, but entering www.vodacom.co.za doesn’t, then changing DNS entries will help. Edit your connection settings, and try one of the following:
196.43.46.190 – SAIX
196.207.40.165 – Vodacom
168.10.2.2 – Internet Solutions (IS)
208.67.222.222 – OpenDNS
208.67.220.220 – OpenDNS alt
It is possible to mix them up, rather than using two by the same company.
Fiddler is a useful tool for tracking http requests and responses. It’s similar to the Net tag in Firebug, except that it can be used to track all requests, not only browser-based ones.
For Ubuntu users, the recommended alternative is Wireshark. Wireshark is noted as being more powerful than Fiddler, but the focus will be on the features most commonly used by web developers for tracking.
Wireshark is found in the Ubuntu repositories, so simply search for wireshark in Synaptic, or enter sudo apt-get install wireshark
Under Applications > Internet, you will notice there are two options. Wireshark and Wireshark (as root). Run the second one (as root) as this gives you more data to track.
After wireshark has started, the process is straightforward:
1. Choosing which network interfaces to capture traffic from. From the menu, choose: Capture > Interfaces
This will bring up a list of network devices.
2. Since my work involves debugging work off my laptop (http://localhost etc), I only start device lo (127.0.0.1). This is useful as it immediately ignores all other traffic.
3. The one thing you will notice is that fiddler will log both the TCP and HTTP requests. For the purpose of debugging AJAX, etc., we are only interested in HTTP requests, TCP requests are not required. These can be hidden by adding a filter.
In the field next to Filter:, enter http and click on Apply.
The steps will now show all traffic coming on 127.0.0.1 via HTTP. The last step is picking up the AJAX parts for debugging. Notice that for each request, there is a response. Unlike Fiddler, Wireshark does not combine the request and the response. So click on the response line, and then expand the Line-based text data row. This will show the text of the AJAX response.
Wireshark takes more steps than Fiddler, and Fiddler is a more focussed program than Wireshark. Wireshark also captures traffic without having to install a plugin into firefox, etc., so it’s useful for debugging applications as well. The biggest improvement to make Wireshark truly replace Fiddler is to turn off truncation of the response text. Wish I knew how!
Recently, I’ve noticed more and more young people talking about and joining Facebook. In one instance, I’ve come to learn that practically a large majority of learners in a secondary school (we talking about 12-16 year olds) have joined Facebook.
In light of a recent incident where a girl met someone on Mxit and ran away from home, it raises some questions:
Understanding Mxit vs Facebook
Mxit is a popular cellphone application in South Africa. In a region and continent with high and excessive telecommunication costs, Mxit is a cheap alternative to SMS (Short Message Service). Whereas users pay a premium rate to send SMS’es, Mxit uses a form of instant messaging, where users only pay for the data cost of sending a message.
Being a cellphone-based social instant-messaging application, the only information really being made available is the cell phone number of the user, and possibly the name of the user if they dont use a pseudo-name.
Mxit (like Facebook) operates on a friend request-and-accept approach, but also offers a chatroom service, and it is seemingly here that ‘relationships’ (for want of a better word) fosters.
Given the ability to generate online friendship, being known for having a lot of online friends, and thus possibly popular, may be one reason why people allow such friendships and relationships to happen.
Enter Facebook
These young people are entering Facebook at a time where it has already reached spectacular growth, and some are even forsaking it for alternatives like Twitter. I’m unable to account for why they are switching to Facebook. Is it perhaps the next step after Mxit? Is it because Facebook offers more features than Mxit? Is it because of the popularity of Facebook and that adults are using it?
Oddly, Internet access is not an issue since many of them are accessing Facebook via there cell phones. Perhaps the fact that Facebook has a mobile version helps.
Facebook Features which could be considered dangerous from a Mxit perspective
If parents become concerned and paranoid about Mxit, it’s not difficult to see why they could possibly be more apprehensive of the dangers Facebook potentially provides at a greater risk than Mxit.
Facebook’s negative could also be positive
I recall an incident a few months ago where an older sister stepped in when her younger sister started receiving inappropriate comments on some of her photos. This is an advantage of an open system, and makes it easier for an adult/guardian to supervise. Needless to say, the intervention was a rebuke to the offenders who desisted from their actions.
What are your thoughts on the matter?

When Mozilla Prism was first launched, I honestly never gave it much thought as to it’s usefulness, or why anyone would want to use it. Today, it is such an essential tool for me. Let me explain.
Adobe launched a program earlier this month whereby it is giving its Flex Builder 3 Professional software free of charge to developers who have been hit by current economic conditions and are out of work. To participate in the program, unemployed developers must attest that the software will be used only for personal use and skill-building—not for any production or commercial purposes. In exchange, they get a free copy of Flex Builder 3′s Professional version, which is normally priced at USD 699.

Recently I came across this advert on the left, and it left be kind of shocked. How did they know i am 29? Is Facebook sharing my details with advertisers?
Knowing it could be too good to be true, I nonetheless clicked on the ad. Pity I’m not in Australia (the target audience), else I could have won the iPhone – yeah right!
Nonetheless, looking up on Facebook advertising, it does offer some really great targeting information. With people providing location, personal info, what they like (fans, etc.) it seems to be an advertiser’s paradise. All that needs to be done is really accurate profile of the target audience.
One just wonders where does the blur occur if it does at all?

DevHub claims it can help you build a money-making website in 10 minutes. I’m going to put that to the test [the building part at least
] and post the results on this blog. Keen to try it yourself?

This is a guide I did a year ago for someone. Never realised it until I recently logged into scribd.com, but it made it to the hotlist.