Sid Verma Unnecessary tautology is unnecessary

> Sid's blog: Page 2


Hillhacks and Hackbeach

Hillhacks, as defined by the website:

hillhacks is held in the lap of the stunning Dhauladhar Himalayas every summer.

People from different places, walks of life and lines of thought come together to share, collaborate and learn.

Hackers talk code. Artists share their creativity. Students join in from schools and colleges to learn new skills. Locals and globals mix and mingle. We build things like tables, hula hoops, interactive art installations, and solar lanterns. We connect. We dance and sing. Ideas emerge. Collaborations form. Lives change.

In the hacking, we get hacked ourselves.

Hackbeach is the sister event of hillhacks, held in the winters, on one of India’s coast.

What we don’t have:

  • Sponsors
  • Organizers
  • Welcome packages
  • Huge well-lit stage
  • Chairs around the said stage
  • Air conditioning
  • Booths and banners
  • T-Shirt and stickers table
  • Catered lunch
  • Coffee machine

What we have:

  • Space to camp
  • Beautiful views
  • A long unconference
  • 2-4 day of main conference
  • Setup and teardown of the said conference
  • Talks and flash talks
  • Opportunities to learn new skills
  • Hackers

What we might also have:

  • Accountants, Anthropologist, Farmers, Activists, Geologists…
  • School programs to teach young kids about science and technology
  • Cooking
  • Slacklining
  • Hoola hoop lessons
  • Board/card games
  • Quiz nights
  • Hiking in the hills
  • All day swimming lessons
  • Paragliding
  • Sleeping on the sandy beaches
  • Cartons of all you can grab stickers
  • Open discusssions across a variety of subjects
  • Demostration of cool projects

Hillhacks | Hackbeach



Link etiquettes for web developers.

This post might seem like nitpicking, or unnecessary to a lot of people, but it’s frustrating when links don’t work how they’re expected to.

  • DO NOT use <span> or <div> tags and then proceed to handle their click events. Use proper <a> tags. This breaks so many things!
    • People can’t use them if they have disabled javascript or it just failed to load.
    • Ctrl-click will not open a new tab unless you explicitly handle the situation. (More on that below)
    • Even then, you just dumbed down your users’ context menus. No Open link in new tab, or Copy link address.
    • The same situation on mobile. Long click will copy the text instead of showing helpful actions.
    • The javascript might break, throw an unexpected error, or burn down your house, rendering that “link” useless.
  • Even when you are using <a> tags:
    • If possible, execute whatever JS you want, and then let the link do its job. Don’t preventDefault() and open the link through javascript.
    • If you really have to open it through JS, take care of Ctrl-clicks. And Cmd-clicks in case of macOs. Old browsers might make this difficult.
  • Put mailto: links only where the email-id is the visible text too. [email protected] is so much better than Contact Email. Not everyone has email clients configured, and opening bulky clients when clicking a link is just bad UX. Or people might just want to note down the address, to contact later.


Wi-Fi positioning woes

Alice lives in India. She has super-cheap cellular internet (less than $0.2/GB on some networks). Cheap enough for it to be her daily driver, using a number of portable Wi-Fi routers, which just sit on her desk. And since it is so cheap and portable and convenient and long-lasting, she just carries it everywhere in her purse, wherever she travels.

Alice also faces an a peculiar amount of problems with her GPS. She could be at a crowded bus station, trying to get an Uber, or stuck in a storm, again trying to get a cab, her phone just fails to locate her correctly long enough for the app to work. Either it’ll just be showing her previous location at the far away house, or it will keep fluctuating and jumping between her actual position, and her house. People around her sometimes get affected too. Maybe it’s a curse.

For most people, device positioning is synonymous with GPS. But these days, GPS is the last thing a smartphone checks when trying to locate itself. GPS takes some time to obtain a good fix, and drains a lot of battery. In contrasts, a lot of your phone radios are less power-hungry and always on. Mostly, it’s a combination of cellular, bluetooth and Wi-Fi. Basically, the signal strength from different cell towers help triangulate your approximate location. Some BLE devices can also advertise their location to nearby devices.

Apart from these, Companies lik eGoogle/Apple/Microsoft/Skyhook maintain a huge list of (Wi-Fi SSID + MAC) => Location combinations to find your location. You might have noticed your phone telling you to switch on Wi-Fi for more accurate positioning at somep point. This is why. This method quite is power efficient, and quick. And in most cases, very accurate.

Note: This is one of the primary uses of Google Location Service on Android.

In out character’s case though, Alice’s wifi router normally always resides on her desk, at her home. The device has the MAC Address AB:CD:EF:GH:IJ:KL. It’s boring SSID is Alice's Wifi. Now, a lot of smartphones around her will be reporting this MAC+SSID combination to some server, along with their location. Her, her guests, her neighbours, almost everyone. They don’t need to be connected to the network. Her router getting scanned is enough.

So, when travelling with the said hotspot on in her purse, if she tries using some location-requiring app, her phone gets wrong/conflicting location data. Depending on the neighboring conditions (the GPS strength, other Wi-Fi networks nearby, etc), she may see her actual location, or her far-away home, or even jumping between the currnt position and her home.

If you find yourself in such a situation and own the culprit router, just change the network name. This should solve the problem for you and people around you. Also, if you don’t have control over the router, try switching your phone from from A-GPS to GPS-only temporarily. It might be slow and power-hungry, but is accurate. Disabling your Wi-Fi doesn’t always prevent it from scanning for networks.

Example of Android's location settings

BTW, this is also how your PCs sometimes know their location. Eg— when you visit Google Maps on the desktop.