Where has the magic gone?

A big change that I've realised during undergrad is that engineering doesn't feel 'magical' anymore.

IMG_0663

One of my favourite school projects: Wireless Electricity!

Of course, a vague term like 'magic' isn't very expository, so let me start with where I'm coming from. In school I was completely besotted with every piece of technology with a screen on it. I might have spent more time caressing my Nintendo 3DS than I played on it. Hyperbole aside, I marvelled its glasses free 3D screen and it felt like its hardware had limitless potential applications if only I knew how to program for it. Of course, now that the Nintendo 3DS has been hacked, I am aware that its capabilities are far more limited than what I imagined in 2011. But at the time, the perception that smartphone class hardware could do incredible things was very exciting and it's a big part of the reason I got into programming with a bit of electronics projects on the side.

Nintendo-3DS-AquaOpen

So much was expected from this venerable console

I had the same feeling when we bought our first home laptop in 2013 (which is now lying unpowered and unused near my study table). My head was dizzy with possibilities and this was before I had an inkling of knowing anything about how to code. Cliche as it sounds, I felt a spark when I implemented a prime sieve to bring my runtime for a Project Euler question from two hours to a few seconds. This was reinforced by a delightfully geeky friends circle in school.

WP_20150413_22_07_12_Pro

Arduino Temperature Display - displaying a balmy 24 degrees C

I experienced it again when I got to play with an Arduino a year later. It did blow my mind in the beginning that I could write C code to turn an LED on and off. One of my first Arduino projects during that time was to interface my UNO with a microphone to view the waveform on a screen using Processing. There was something very satisfying about practically understanding how sensors worked. In the end, I repurposed my UNO to function as a 7 LED binary display for my TMP36 ambient temperature sensor.

However, I think the turning point was during my first GSoC project after my first year of college. While learning how to develop good quality software for a terrific open source org like KDE was very inspiring in the beginning, I realised that the magic which I used to feel when programming was slowing being snuffed out the more I understood what I was doing. Once I had a robust mental model of the problem and its solution, writing code for it just felt like a perfunctory task. I was no longer fascinated by the fact that the code I was writing was arcanely converted to binary and executed on a billion transistors at its lowest level of abstraction. In the remaining three years of undergrad, I was fortunate to get the chance to work on some awesome projects, but the magic which I used to feel with doing something new is replaced with a wary feeling of knowing that I would need to figure out how to solve some pressing technical issue in the project. In that sense, I have developed a much better eye for spotting technical solutions.

Knowledge is a double-edged sword. Things were far more exciting when I was a brand-new, bright-eyed programmer, but it's only because of the experience I have gleaned from one project that I have been able to do another. I could blame it on burnout earlier, but having had a very relaxed final year, I can't say that's the case anymore. It has led me to think that the exciting part was never the actual implementation (or coding in this case), but figuring out the solution instead. I am rather glad that this is how things have turned out, for I think an 18 year old version of me would've rather chased a failed start in GUI building/frontend web development if the coding part was what I enjoyed. All my reservations aside, I still loved the things I have worked on and the people I have met along the way. Yet, I wouldn't mind treading some unfamiliar ground for rediscovering the magic which drew me to engineering in the first place.

The related discussion on Hacker News for this post can be found here: https://news.ycombinator.com/item?id=20222096

A Russian translation of this blog post can be found here: https://mygpstools.com/kuda-ischezla-magiya

Places to Visit in Singapore

I recently returned home from a very memorable 4.5 months in Singapore.

I've been to many places, met amazing people, and learned so much during my internship at the Acoustic Research Laboratory at NUS. I've also learned to become a bit more careful with my finances, which was all the more important given the constraints of my S$1000/month stipend. As I figured out during the course of my time in Singapore, this stipend doesn't go very far in covering more than basic expenses. Nevertheless, there's still plenty you can see in Singapore on a budget.

If you're going to stay in Singapore for any longer than three days, buying an EZLink transport card is well worth the S$5 investment. EZLink cards work in all of Singapore's modes of public transport and it's much more efficient and cheaper than buying a ticket for every trip. CityMapper and SingaBus (iOS and Android) are your best friends when it comes to planning the best combination of buses and MRT lines islandwide. In my experience, the buses were much slower than the MRT (especially during peak traffic hours), but they are far more comfortable with ample seats and powerful aircon. It is also a good idea to check the EZLink trip transfer rules which can save you a lot of money if you plan in advance.

All the below places are either free or can be done for less than S$15 per person.

Sungei Boloh Wetlands

20190504_054930309_iOS

One of the many monitor lizards we saw that day

The Wetlands is a pretty interesting place located in North Singapore. It's so close to Malaysia that you can easily catch a glimpse of Johor Bahru from the boardwalk. Unlike Singapore's other parks, the Wetlands is an unfiltered experience. On a good day, you can easily expect to see several animals ambling about the forested area. We saw five monitor lizards, a number of mudskippers, schools of needle fish, an uncountable number of birds, a cobra (!), and even a wild crocodile lying just out of sight. It makes for a great day trip if the weather cooperates and the only thing you'll need to spend here is your time.

Southern Ridges

20190127_102054487_iOS

The famous Henderson Waves Bridge

The Southern Ridges is a trail running through five parks, from Mount Faber (near VivoCity) to Labrador Nature Reserve (near the NUS campus). It's an amazing 10km walk and I loved the views from the Henderson Waves bridge and the Canopy Walk. I really appreciated how green Singapore is from the views at Henderson Waves! As an aside, I tried making an 8km evening run from Mount Faber till Science Park, but I quickly got worn out by all the steps and elevation. Walking through the park is definitely more enjoyable.

Marina Barrage

20190323_121921670_iOS

A spectacular view from the Barrage

If you're into ships, the Marina Barrage can offer quite a spectacular view. The Barrage is located near Marina Bay Sands/Shoppes. It feels very communal at the top of the Barrage, with several families setting up picnics and children flying kites. Unlike the Southern Ridges (which is breathtakingly beautiful, but far too strenuous for a run), this can be a part of a fantastic 10km running trail, starting from the Merlion Park to the Marina South Pier MRT Station via the Marina Barrage.

Pulau Ubin

20190302_062904418_iOS

View of Chek Jawa from the Jejawi Tower

This is one of the more exciting parts of Singapore. Pulau Ubin is an island located in the North-West part of Singapore. It's accessible by a S$3 (March 2019) boat ride from Changi Village. Like the Sungei Boloh Wetlands, the island is geographically close to Malaysia. It's so close that I noticed that my cellphone shifted to receiving signals from MyMaxis Malaysia instead of StarHub Singapore!

20190302_083938302_iOS

Cycling Trail at Pulau Ubin

While Pulau Ubin has had some artificial transformation, I got the feeling that NParks went to great lengths to make it easily traversable while preserving the natural beauty of the island. Speaking of traversal, the best way to get around Pulau Ubin is by mountain bike, which can be rented near the jetty for S$10-15 for the entire day. The Chek Jawa wetlands is similar to Sungei Boloh (though we didn't see half as many wild animals when we went). The Ketam Mountain Bike Park in the west part of Pulau Ubin can be quite a challenge. The Blue Trails are moderately difficult with rough paths and small slopes, while the Black Diamond and Double Black Diamond trails are utterly brutal. Attempting the Black trails with the Reebok bike I rented was out of the question.

We spent nearly six hours cycling around Pulau Ubin. Carrying food and water is recommended, though there are plenty of vending machines dotted about the island. Sunscreen is also a must.

St. John Island

20190512_031235950_iOS

Singapore's Skyline from the ferry

This is another island adventure, located towards the southern part of Singapore. The ferry ride to the island is wonderful and it was fun to watch the Singapore coastline go by - from the sweeping skylines of the Marina Bay Financial Centre to the HDBs in Jurong. Unlike Pulau Ubin, carrying supplies for St. John Island is imperative. There is no drinking water on the island, nor is there any food to be found. At my insistence, we went to see the Tropical Marine Science Institute's research lab. Of interest is the bucolic Lazarus Island.

20190512_050231232_iOS

We spent half an hour skipping stones here!

The same ferry ticket also includes a stop at Kusu Island. Although Kusu looked lovely, we were far too exhausted and we had to beat a hasty retreat to Singapore after completely running through whatever little supplies we had brought with us.

MacRitchie Reservoir/TreeTop Walk

20190423_044040982_iOS

TreeTop Walk Suspension Bridge

These two places together are ideal for a very enjoyable day trip. I suggest starting from Windsor Park, hiking to the TreeTop Walk, and then walking to the MacRitchie Reservoir via the well-manicured Golf Link. The TreeTop Walk takes you between the tops of trees using a very unique suspension bridge originally constructed for ecologists to study the ecosystems of the tree canopies. The suspension bridge is one-way and is quite narrow. I went alone on a weekday and I loved having the entire bridge to myself.

20190105_075641293_iOS

MacRitchie's Art Pavillion

MacRitchie has good running trails, boardwalks, and some much needed eating options once you finish the trail. Of note is the Leaning Tree in the middle of the boardwalk. The boardwalk was specifically redesigned in a section to accommodate this tree and this exemplifies how much Singapore cares about preserving its natural wonders!

There are many places which I also loved but didn't make it to this list. Honorable mentions go to:

  • Gardens By the Bay
  • S.E.A. Aquarium
  • East Coast Park
  • Chinese Garden/Japanese Garden
  • Jewel (Changi Airport)
  • Woodlands Waterfront Park

I can't recommended Singapore enough for a short-term visit or an internship. It's a beautiful city with plenty to do, cheap and delicious food, and efficient public transport. What's not to love?

Singapore!

It's been almost two months since I've landed in Singapore.

I'm here for completing my undergraduate thesis on "Disruption Tolerant Networks for Underwater Applications" at NUS. I'm working under Prof. Mandar Chitre at the Acoustics Research Laboratory (ARL).

So far, I've been really happy. I have to pinch myself ever so often to make myself believe that I've landed the privilege of getting to work with such gifted people at the ARL. It's hard to believe that a formal project on DTNs that I had taken on a whim in my fifth semester would later culminate with a Elsevier publication and a research internship at NUS, all while helping me fill out a considerable part of my Statement of Purpose for graduate school.

Singapore has been an beautiful city to live in as well. The city boasts of efficient public transport, awesome running trails, and a surprising amount of urban greenery. That said, I've never quite been able to shake the feeling of constant surveillance wherever I go. I remember being very concious of my mannerisms in my first week in Singapore, knowing that straying from the law is dealt with very harshly in this country. But since then, I've eased in to the modus operandi of day to day life in Singapore. Despite (or rather, because of?) the much higher quality of life compared to India, it has been easy to adjust. I am surrounded by Indians in both my lab and apartment, so I haven't felt far from home either. The Sea2Space building, closely related to the ARL

It's been a welcome change from attending a college stranded dozens of kilometres from the city. It has been much easier to travel impulsively. No two weekends here have been the same either - be it either spending an evening at Clarke Quay or kayaking in Indonesia.

View from the Chinese Garden Tower MacRitchie Reservoir The imposing Marina Bay Sands and Gardens by the Bay The Singapore skyline from the Marina Bay Sands observatory Trip to Bintan, Indonesia With my school friend, Sharan

It's not all been sunshine in Singapore though. While I am very glad to be funded by the ARL, my stipend only just covers all my basic living expenses. Singapore is not cheap! Every purchase I make is accompanied with the mental gymnastics of figuring out how much my outlay would require me to spread out the remainder of my stipend over the days until I receive my next cheque. On the other hand, I have realised that I really do need some practical experience in budgeting and this is probably the most controlled and risk-free environment in which I can learn to manage my finances. NUS Campus

Hanging around at NUS has made me miss college as well. Seeing groups of students at any of NUS' several coffee shops, or at UTown in NUS always has made me nostalgic for campus life. Being an intern, I don't have any student access privileges to facilities such as the the Central Library or any of the student recreational centres. From my perspective, the campus is a terrific place to work, but not a place I can feel connected with, at least not by the time my internship ends in May.

Yet, I wouldn't trade anything for the satisfaction I get with working at the ARL. I look forward to every day, and it truly is exciting to work in a field where there is only a sparse amount of existing research. I am glad I spent an inordinate amount of time programming throughout college as it has made my experience of debugging and learning my way around Unetstack far smoother. I also appreciate the methodical approach to research at the ARL, for it has done wonders for my productivity while keeping stress levels in check.

I'll conclude this by saying I look forward to my next three months in Singapore :-)

I have published a paper!

I am delighted to announce that my work on Delay Tolerant Networks has culminated into a paper, published 11 months since the project started!

In this project, I worked with a faculty of the CS department, Mr. Abhishek Thakur and a college senior, Tejashwar Reddy. Here, we showed that it is viable to send specially encoded videos using an opportunistic network of Android devices. We called it VECTORS, short for "VidEo Communication Through Opportunistic Relays and Scalable video coding". Since it's published under Elsevier's Open Access policy, it does not require any subscription or institutional login to access.

DOI: https://doi.org/10.1016/j.softx.2018.12.006

As a continuation of this, I am currently at the Acoustic Research Laboratory at NUS for a project on underwater DTNs. But that merits a blog post of its own another time ;)

My Favourite Videogames (Part 2)

One post isn't enough to do justice to the number of fantastic games I've played of late. I've played a large number of games from 2017-18 and I have three more that make the cut for the Greatest Of All Time in my books.

EarthBound (SNES)

Released 1995. Played 2017.

VjVs43xjJYu-h25H4WFEDNkX7esX7Zzy2rUHqFStv_U

Released as Mother 2 for the Nintendo SNES in mid-90's Japan, EarthBound is the quirkiest game I've ever played. Despite being over two decades old, the humour still feels fresh and the game mechanics are remarkably prescient of what future RPG's would continue to use.

At its core, EarthBound is a 2D JRPG where 13-year old Ness has to the save the world from the wrath of an evil…force(?)…called Giygas. It has most of the core JRPG elements such as turn-based battles, multiple party members, inventory management, and a Health/Battle Points system. What really distinguishes EarthBound is the absolutely insane variety in the enemies. You battle absolutely everything - from a pile of puke to Blue KKK Cultists to taxicabs and Salvador Dali clocks. In a stark contrast to the brain-dead NPC dialogue in modern RPG's, EarthBound has some of the funniest lines of NPC dialogue you will ever find. The soundtrack is enjoyable and surprisingly detailed in places, especially given the 4MB size of the game. To truly appreciate EarthBound, it's best to spend some quality time playing it slowly. Every single frame of this game just oozes with charm.

images-1 Just EarthBound things

Perhaps the best thing about EarthBound is how fearlessly creative it is. Unlike contemporary videogames, EarthBound doesn't hold back on breaking new ground for using familiar elements which would appeal to a broader audience. This fearless approach did result in EarthBound's commercial failure on launch in North America, where it was puzzlingly marketed with the tagline "This Game Stinks!". Perhaps Nintendo of America was banking a little too heavily on the gross fascinations of pubescent boys to turn EarthBound into a blockbuster success.

However, EarthBound is far from a perfect game. Being old as it is, not all of its mechanics have aged well. Put mildly, the inventory management system is a downright terrible. The turn-based combat gets very tedious after a while (though there is an AUTO battle mode to somewhat fix this). Moreover, the player characters move very slowly in relation to the size of the game world. The Run button from Pokémon games is sorely missed here. In all, it's quite clear that the game was designed for an era in which there were far fewer competing distractions for one's attention. As I played the game in an emulator, I 100x'ed some of the slower parts to get through the game. Nevertheless, a single playthrough of EarthBound was enough to convince me that this is a severely under-appreciated Nintendo classic. If videogames were works of art, EarthBound would be the forerunner of the Surrealist movement. It's one of Shigesato Itoi's and Iwata's finest masterpieces.

EarthBound was a key inspiration for Toby Fox's Undertale released in 2015. At first Undertale felt like a distilled version of EarthBound, sharing the same sense of humour, but with significantly better pacing and an interesting combat system. Yet, on finishing Undertale, I was more of the opinion that it was a watered down version of EarthBound. It didn't capture my imagination the way EarthBound had.

After the release of EarthBound, Itoi and Nintendo worked on Mother 3. Mother 3 endured development hell for twelve years, being cancelled and reannounced for nearly three generations of Nintendo consoles. In the end, Mother 3 was finally released for the GBA in Japan in 2006 (two years after the release of the DS!). Unfortunately, Mother 3 still hasn't been officially translated for an international release, making the series a lost Nintendo legend. If you're interested in the story of EarthBound's development and about the game itself, AVGN's video is a great 40 minute primer:

Portal 1 (PC)

Released 2007. Played 2018.

400_screenshots_2014-08-08_00001

I had a blast playing Portal 1 this January after picking it up in the Steam winter sale. It's easily the most recognisable game on this list and it needs no introduction.

Portal 1 is the epitome of good game design. There's minimal hand-holding and the levels are perfect in length and difficulty to give the player an intuitive understanding of the game mechanics before moving on to the more complicated puzzles. Instead of being ornamentally detailed, the visuals are just sufficient to convey essential information without being distracting.

There are no low points during the game and the entire experience is thoroughly enjoyable. Portal 1 demonstrates perfect pacing in a videogame. So many things in Portal 1 are just right. Given it takes only six hours to finish and is available for as little ₹30 on sale, it's an excellent addition to anyone's Steam library.

Portal 2 expanded on the formula established in Portal 1 with more complicated puzzles and new mechanics. The voice acting is even better with the snappy Wheatley and the hilariously deadpan delivery of Cave Johnson. However, the perfect pacing of Portal 1 didn't carry over to Portal 2. In several mid-game levels, the cluttered environment and confusing lighting effects made it difficult to find a white tile to open a portal. I would have much rather had the simpler lighting model of Portal 1 as it was far easier to visually parse. That said, Portal 2 still reaches the mark for a notable mention in my list.

Spelunky (PC)

Released 2011. Played 2018 - Present.

spelunky-jungle-2

The final game on this list is also the one I've played the most this year. I was lucky enough to snag it on the Steam winter sale last year and it's easily the best ₹50 I've ever spent.

Spelunky is an insanely difficult 2D platformer with 16 randomly generated levels in each playthrough. There is no concept of saving progress in Spelunky and death is permenant. These two features make it impossible to play memorising the levels as you can in a conventional 2D platformer. Every moment of Spelunky is filled with compromise and multiple branching decisions. Picking the wrong one can send you all the way back to the beginning. As most monsters in the game have between 3-10 HP, the Spelunker isn't even much stronger than common monsters with just 4 HP, 4 Bombs, and 4 Ropes at the start of each run.

This makes death an innate part of the progression system of the game. With the lack of in-game saving, the progression is the evolution of the player in becoming better at playing Spelunky. Each death teaches the player a bit more about its mechanics. Death in Spelunky is almost always fair, implying that more often than not, death is due to your own mistakes.

The randomly generated levels give Spelunky infinite replayabilty for no two runs in Spelunky ever share the same levels. Certain patterns and obstacles may become familiar after a while but clearing an entire level requires coming up with a plan on-the-fly for each section. The best moments of the game are had in using a unfamiliar new item to sweep through the game in ways I would have never imagined.

spelunky-death I think I'm done for the day.

Getting better in Spelunky is the most satisfying feeling I have ever experienced in a game. An entire run of Spelunky from 1-1 to the final boss in 4-4 can be done in as little as 20 minutes, but it take just as many hours to get good enough at the game to do so.

Spelunky is also chock-filled with comic relief and dark humour. I absolutely adore the cartoonish art style which belies the incredible difficulty of the game. Nothing in the game takes itself seriously and even dying thanks to a chain reaction of events can be absolutely hysterical at at times.

You can rescue Damsels in distress for a point of health, but you also have the option of sacrificing them to the altar of Kali for a free item. Damsels are also effective projectiles and can be used for killing other enemies by throwing them. Shopkeepers, the ornery merchants of the Spelunky world, are another source of great amusement. Items from shops can either be bought or stolen. Stealing items puts you at the contempt of all the shopkeepers who will do everything to kill you for the rest of the run. It is this kind of crucial decision making which really gets at the heart of what makes Spelunky great. Mark Brown's excellent video explains the level generation system and goes into the crucial decision making process which makes Spelunky what it is:

The game is also incredibly mechanically sound. There are so many options for traversal of a level in which you need to go from the top to the bottom. Each tile of the Spelunky world can be destroyed using a well-placed bomb, making resource management an important theme of the game. Controls are also razor tight. Thanks to the low inertia of the Spelunker, playing the entire game on a keyboard is completely feasible. In fact, it's my preferred way to play Spelunky.

Not only is it super addicting to play, it's addicting to watch as well. My early forays in Spelunky were with my wingies jeering every death. I ended up becoming a far more careful player as a result. I tried to learn as much as I could about the game mechanics in every run. In some ways, this single player game brings people together more than some multiplayer games can.

Lastly, Spelunky also hosts a number of secrets under its 2D tiled world. The most significant of these is the much vaunted Hell run which requires true mastery of the game to complete. At the time of writing, I have clocked up 1500+ deaths in Spelunky, out of which I've reached Hell just five times.

I will go as far as to say that Spelunky is probably the best videogame I've ever played and I am absolutely HYPED for Spelunky 2 coming out in 2019.