Posts Tagged ‘graphs’

(on Technorati , Del.icio.us)

Script: Wireless Strength Polling/Logging/Graphing

Initially, I wrote this script to give me frequent feedback on the signal strength. This is useful when adjusting antennas to that sweet spot that give stronger signals; especially if you’re testing some homemade tinfoil parabolic reflectors! 😉 If you have a portable wireless device, like a netbook, you can ssh into your (wireless) desktop and run wireless-strength to get realtime feedback on adjustments to the access point’s antenna… assuming the connection doesn’t break. 😛 And, of course, you can just walk around running it on your mobile device to create a kind of wireless heatmap.

If you have gnuplot, you can also generate graphs from the data with ws-plot. This is me walking around my house with my notebook:

I started in my room (40% 🙁 ), which is where the first peak is – near the window. Left my room, back to 40%, peak near window again, then bathroom… 40%. The climb from 40-80% is me walking towards the TV room (PS3 lives in a solid 80% zone, at least!). Walked upstairs, got 100% in most areas (that’s where the Access Point is) – tried a bedroom, dropped to 40%.

Download the scripts and get more details here: https://github.com/izm/wireless-strength

Nerdy Ramblings

This script originated years back, but I recently tried using it on my laptop and it didn’t work! Unacceptable! The original parsed the output of iwconfig. But what showed up as “Quality=30/70” on my desktop, would show up as “Quality:4” on my laptop. COMPLETELY DIFFERENT. Even the character after “Quality” was different! o.O The output of iwconfig is driver dependent, which is why I looked to network-manager. I figured there’s probably a nice dbus command I can send to network-manager for that purpose – but I got tired of looking and decided to just parse output again. :/ Luckily, network-manager includes nm-tool. It’s certainly not a clean solution, but it works for now.

I also used updating rewriting the script as an excuse to get better acquainted with git – which I’m really liking.

Every time I do a bash script, I vow to do the next script in Python. I like Python and I don’t like Bash… but there’s a certain… nativeness or dependency-free elegance to bash scripts. Still, I hate writing them, and the next script’s in Python! 😛

DIY Wireless Booster

To access the Internet on my desktop computer, I must use wireless. Unfortunately, it’s about as far away from the access point as possible: opposite corners of the house and different floors. And the wireless card I’ve got in my desktop is a little old and pretty cheap. Basically, I’ve had to battle with a poor connection for years. Often, I would have to manually move the antenna an inch this way or that, try reconnecting, and repeat. I vented to my friend, Shirley, about my connection, and she said her friend was having similar issues, so Shirley recommended she make a signal booster. That’s something I’d been thinking about doing, and thought it was about time. I googled how to make a booster. Enter the Parabolic Reflector available here. I’m sure there are lots others, but this is the one I decided to try out.

Desktop antenna with booster

I made 3 of them. the first was made entirely with paper and tinfoil and it worked fine, but I figured I would try making a couple more with different materials: 2 different strengths of card. It’s good I did that too, as I ended up using 2 of them and giving the paper prototype to Shirley’s friend who most likely has better things to do than build paper parabolas. 🙂 (I, on the other hand, do not.)

Gluestick?  Check.  Scissors?  Check.

Access point hidden away, with booster pointed down slightly (towards my room)

What does it do? It turns your omni-directional antenna into a directional antenna with a stronger signal. The tinfoil does the radio wave reflecting and the shape (the parabola) just happens to be an efficient way to do that. Using this new direction, I’ve “pointed” the antenna on my wireless router towards my room – even on a bit of an angle through the floor. In my room, on my desktop PC, I’ve just pointed it horizontally in the direction of the access point.

Wireless signal strength over a few days

The results have been great. Without any home-made boosters, I received 25-35%, with one on the access point, i received 35-55%, and with one on both the access point and my desktop antennas, I’m receiving a pretty steady 62-68% (see the graph, above). I still receive disconnects, but it’s now much easier to reconnect… usually happens automatically on the first try – I don’t even have to do anything!

So if you’re having wireless issues, give it a shot! It certainly doesn’t cost much. 🙂

Canadian Income Tax 2009

If you have any trouble understanding how income tax works or is calculated, play around on this webpage and see if it helps you. (It probably won’t, but you might have fun not learning anything!) It lets you dynamically compare different income taxes within Canada using a pretty graph and it lets you calculate your own (simplified) tax results, whether your income is salary or hourly based.

canitax

Why Did I do this?

I didn’t do my taxes; an accountant did. But when I was reading about them, I stumbled upon a couple webpages and became interested in the differences among the provinces and territories within Canada and
different income ranges. That’s what started this mini Javascript project.

This is not a work of art

I wrote it mostly on the bus using my recently acquired Dell Mini 12 netbook (on Windows XP… ew). And from that experience, I can firmly say that writing even very simple things, it’s good to have a fair amount of time set aside in a relaxed environment. I would write a couple things here and there for 20 minutes or so… then not look at it again for a few days… it took me 5 minutes to figure out what I wanted to do the next time I opened it. The only times I made significant progress was when I sat down for more than an hour. The code wasn’t really designed, it was just… written. It’s messy, there’s lots of hard-coding, poorly named fields and variables (didn’t help with figuring out what I was doing last time), and if it were anything serious, I’d rewrite large chunks of it. And make it prettier. But as it stands, it’s just kinda fun. 🙂

In addition to being curious about the taxes in Canada, I was also interested in trying a javascript graphing library. I had been impressed with different javascript-generated graphs on the web and wondered how difficult they were to create. I used FLOT (with lots of copying and pasting from examples), and it seemed to work alright, but it depends on JQuery, which I wasn’t familiar with. Actually, I’m still not very familiar with it… and wrote almost everything in regular javascript. I know it’s worth learning, but I guess I’ll save
that for another time. 🙂

Let me know of any errors in tax calculation.. or code design, for that matter. There’s lots of those, but I’m sure I’m not aware of all of them! hah.

(I’ve been sitting on this post for about 2 months now. hah! Figured I might as well publish it.)