08 June 2023

When can we use spoken English as a programming language?

English has become unnecessarily complicated. Simplifying it will also help simplify AI training and daily use. What would you like to simplify about English?

Husbands across the world are familiar with how their wives use English or any other human language (or a broom) to “program” them into doing exactly what they want. The “code” in your mind is also getting re-programmed as you read this article. Such “dynamic syntax and semantics” which actually understands information and context, is ideally what we want computers to be capable of. Why aren’t programming language creators channeling efforts in this direction?

At my first computer class, our teacher said: “the computer is a dumb machine. It only does exactly what you tell it”. Although programs like Flappy Bird and GrootGPT have been built by prompting ChatGPT in English, and with GPT-4 generating websites using a diagram as a prompt, I do believe we are getting closer to being able to program computers by simply talking to them.

Don’t do the work. Make the computer do the work for you — Nav

The redundancy of memorizing syntax and semantics

Look at the various ways programmers had to learn and re-learn how to write a simple loop, because programming language creators decided to let their imagination go wild, instead of thinking about the end user:

  • Repeat 3[Forward 100 right 90]
  • for(int x = 0; x<=3; x++)
  • FOR i = 1 TO 3
  • for (let i = 0; i < a.length; i++)
  • for i := 1; i <= 3; i++
  • for x in data:
  • for a in 1..3 do
  • for i in {1..3}
  • for a = 3.0: -0.1: 0.0

As programmers gain experience, learning the wanton fluctuation in syntax and commands gets mentally exhausting. Creators of frameworks and programming languages really need to put in effort to provide simplicity and familiarity for the users. Either that, or build an AI to handle it.

It’s the same with conditional statements, classes and datastructures. In one language you learn the length of an array is array.length(). In another language it’s len(array). With for loops, what if we could just tell a computer to…

loop three times

…and the computer would understand it and automatically translate it to any high-level or low-level language we wish? The same applies to the unnecessary complexities of web frameworks. It’s mentally exhausting to be forced to learn all the nuances of PHP, then Struts2, then Spring framework and then realize that you also have to learn a different bunch of nuances of Django for a new project. Unfortunately, even new frameworks/languages like Julia and Modular’s Mojo are busy building a new syntax.

The future: Being able to talk to an IDE to do programming is just the first step. Improved versions will have us talking and interacting with (or even mind-controlling) not just a visualization of the final product on the screen (rather than deal with the code), but we’d be touching and interacting with what we create, via Virtual and Augmented Reality. Complexities and details will seamlessly be handled by an AI.

As programmers gain experience, learning the wanton fluctuation in syntax and commands can get mentally exhausting if one has to switch between languages multiple times. Creators of frameworks and programming languages really need to put in effort to provide simplicity and familiarity for the users. Either that, or build an AI to handle it.

The digital debt of repetitive manual tasks

As a full-stack developer, I’m fed up of manually having to start servers or write scripts to do it or setup manifest files and manually plan and test out the connectivity of disparate web technologies. Then there are the errors, compatibility issues and bugs that show up repeatedly which again require manual intervention. Then there’s the need to type and memorize commands like “kubectl run -i …” and also memorize which other parameters require a double dash “ — tty”.

These are all things that an AI assistant algorithm should be handling. Human intelligence and intervention is of course required, but a lot of the repetitive work can indeed be handled by an AI. This means massive cost savings not just in effort, but also in having reliable software (thus not losing time in debugging and also in not losing customers).

But we are too busy to build this, aren’t we?


Simplifying English as a first step

Haven’t you always wanted to just say “eye doctor” instead of having to spurt out “ophthalmologist”? Do we really need words like “yeet” when “throw” communicates it just fine? English is a language that borrowed from many other languages and grew massive with time. There’s a prominence of English used in programming languages, and it would help to simplify it.

Time: Was it really necessary to have 12am and 12pm? Isn’t 12:00hrs and 00:00hrs so much clearer in referring to day and night? Even clocks don’t need to have the pointless hour and minute hand where we are expected to do additional mental processing to interpret 6 as 30. It’s just silly!

Months & days: Couldn’t we have month names as Month1, Month2, instead of January, February? Couldn’t we have days of the week as Day1, Day2? I still find it hard to figure out what day of the week people are referring to in regional languages.

Planets: Mothers would be glad to not have their seating choices questioned, with mnemonics like My (Mercury ) Very (Venus) Elegant (Earth) Mother Just Sat Upon Nine Porcupines. Planets could simply be named Planet1, Planet2, and so on.

Spelling: Couldn’t we write words the way they are pronounced? “Kayos”, instead of “Chaos”, “Kernel” instead of “Colonel” (or just have military ranks as Rank1, Rank2A, …). Shorten unnecessarily long words like “Abbreviation” into “Abbr”? Get rid of the dots in “E.g.” and “etc.”.

I know it appears weird at first, but when you think about it, you’ll realize that we’ve just been conditioned into accepting and normalizing weird spellings and conventions.

English has become unnecessarily complicated. Simplifying it will also help simplify AI training and daily use. What would you like to simplify about English?

Reality of “AI” not being intelligent

“Intelligence” is still in the human brain. We haven’t really managed to make Generative AI or Artificial Neural Networks, truly intelligent. Using probability values to predict tokens is definitely not intelligence. When building GrootGPT, I noticed how ChatGPT didn’t actually understand what I meant by the left or right side of the page. It didn’t understand enough to modify the generated code to make the lightbox disappear when the User clicks outside the box. Colleagues have told me how ChatGPT would import imaginary packages in Python. Even though the results of current state-of-the-art of Machine Learning is impressive, the direction of research needs to be altered to build systems that are capable of independent logical analysis and adaptive learning. As few researchers have observed (and even I presented in my thesis), this requires allowing the AI to experience the world in the way we do. It is difficult to achieve, but I’m sure it is possible if people have the courage to break free from conventional thinking.

Communicating without errors with humans using English is tough in itself. An algorithm will need to take in a lot more context. Still, let’s see if it’s the open source community, academia, an independent researcher, or a corporate that builds the first truly intelligent algorithm. It should be incentivized. Although we have RPA, no-code frameworks and convention-over-configuration, we are still spending a lot of time and effort re-building and fixing things. This is not how life should be lived. We need to create more spare time to pursue our pleasures/interests and spend time with the people we love. To live, rather than just keep working long hours everyday! For a start, couldn’t we use existing tech to automate-away a lot of drab, monotonous tasks and build interfaces to command them with our voice? At least I’m going to try…

25 May 2023

Switching to Mint

I got fed up of the bugs in Ubuntu and switched to Mint. Here are some things I liked about it. 


  • Setting up the computer wizard. 
  • Snapshots.
  • Pinning and starring important folders.
  • Checking for drivers.
  • So many better backgrounds. 
  • Cool system sounds that are much better than Ubuntu. 
  • Setting up firewall graphically. 
  • Intro to software center. 
  • Showing how to contribute.
  • More detailed system info. 
  • Accessible crash reports.
  • Able to extend the duration of data in System Monitor.
  • None of the ugly pink color. 
  • Terminal fore and background is the right color.
  • Shows occupied disk space graphically. 
  • Easier to switch off system sounds and none of the annoying drumbeat. amplification.
  • No amazon bloatware.
  • No more notification messages that block the screen.
  • No desktop icons shifting positions and can paste to and from desktop.
  • Can easily adjust the positions and distances of icons.
  • Better workspaces.
  • Preview on icon hover from the taskbar.
  • Applets for the system tray.
  • Lesser loading time. Shutdown in fewer clicks.
  • Good ol' Ctrl+Alt+L for lock screen.
  • Really helpful community.

...and so much more! Linux Mint OS was built for the Desktop PC, and to keep the interests of the Users in mind.

02 May 2023

Finding work when companies and society have a poor support system

The recent mass layoffs at big-tech companies are  proof that one shouldn't link their emotions, loyalty or future to a company. It's important to be independent. With the advent of Artificial Intelligence (or rather, Machine Learning) algorithms, the redundancy of older jobs and the creation of new types of jobs are likely. 


However, life isn't all that simple. One can be injured and end up with a permanent disability, one could suffer a burnout that makes it difficult to work long hours, one could have aging parents or a family member who needs to be taken care of. These require a support system in society (helpful neighbours, friends and relatives) and a support system in the job market. 

This is one reason I created this list of freelance opportunities that people could use (click link).

 

Despite this, there are some things that people need to learn from a young age:
1. Become financially independent ASAP: Avoid pitfalls like loans, mortgages, pointlessly expensive holidays, expensive things, too many kids and financially draining relationships.
2. Network: Spend time in building not only good relationships that can get you jobs, but also building and enriching the freelance world where one can focus on bits of work and leisure at ones own convenience. Remember however, that networking isn't just about getting benefits for yourself. You need to provide value to your network too.


11 April 2023

Tips for building a PC yourself

It's 2023, and even now there's not a single website that provides all the necessary selectors or an AI which can help users identify, compare and select PC parts based on what has been successful in the market and based on which of those parts are actually in stock at retailers or wholesalers.

There are however some tools and tips I'd like to share, which can help newbies. My old Gigabyte motherboard (bought in 2012) stopped working recently for no apparent reason, when I resumed it from suspend mode. There were no POST beeps, and the CPU fan would twitch, but wouldn't start. 

If I rotated the fan by hand, it'd continue spinning on its own lazily. These problems probably started after an automatic BIOS update (which probably happened because of Windows 10 being present), and the motherboard's sudden stoppage appeared to be due to planned obsolescence. There are quite a lot of other people posting similar problems on Tom's Hardware forums. 

So the PC upgrade began with a new SMPS. 

Buying an SMPS/PSU

It is said that the length of warranty a manufacturer provides, is an indicator of the quality of components used in an SMPS. Check for overvoltage protection and short-circuit protection. There's no need of going more than 150W above your power needs. A bad PSU can erupt in fire.


On researching various available brands, these were some points I noticed from various reviews:

There are published lists of the quality/efficiency of PSU's:

You can verify the 80+ certification of a PSU (a lower wattage SMPS is more power-efficient when idle, so you can save electricity by getting the correct wattage instead of a higher 80+ rating):

There are websites that offer an SMPS power calculator (many may not be very accurate):

Observations from reviews:

  • Ant ESports: Said to be of cheap quality. Unstable voltage.
  • Antec: Reviews say it has bad customer support, missing cables, damaged cables, and the SMPS blew up for one person.
  • CoolerMaster: Not necessarily good, but may have some good models.
  • Corsair: Was said to be good earlier, but suspected to have cheap parts now, since more than one customer reported a sparking noise and for one person it failed in a year. The plugs are not meant for India (I don't understand why they can't supply a different plug), so you need an adapter. Said to have good customer support (which is handled by a franchisee in India).
  • Zebronics: It blew up for at least one person. Couldn't handle sustained load. The higher power SMPS actually had an 80+ certification.
  • Artis: One of the cheaper quality PSU's. A user had trouble waking from suspend. No fluctuation protection.
  • NZXT: Said to be good. Acro Engineering in Bangalore is the service centre franchisee. They were responsive. Comes with a ridiculously huge 16A power plug which won't fit into any of your 6A sockets. However, even their official customer support in Spain was helpful and responsive. They confirmed that for my power needs, I could use an old 6A power cord I had.
  • Asus: Good quality and good warranty. However the Bangalore service centre does not handle SMPS servicing.
  • EVGA: Said to be good and said to honour their warranty.
  • MSI: Could be good. Service centre was responsive, but background noise at the centre didn't allow me to confirm if they handled SMPS servicing.
  • Seasonic: Among the best. But expensive. One User said his SMPS failed within a year and he had to ship it to Kolkata to get it replaced. But the entire process of replacing it took just one week.
  • ThermalTake: Among the best. But prohibitively expensive.

Precautions:

  • Make sure you buy from a reputed brand that offers a 5+ year warranty (Seasonic and ASUS sometimes offer 6+ year warranties). A stable voltage supply, various power conservation features and part quality matter, when it comes to keeping your motherboard and peripherals safe.
  • For the wattage, seek out an SMPS whose wattage number is "continuous" (steady maintenance of that wattage) rather than "peak" (can reach that wattage only for short periods). 
  • A multi-rail SMPS is advised if there's high voltage fluctuation in your area. There are three basic rails: +3.3V (PCIe/AGP, chipset and some DIMM), +5V (PCI/AGP, low voltage motors, SIMM), and +12V (PCIe/AGP, high voltage regulators, motors). SB is Standby voltage.
  • See if it helps to plug the SMPS into a voltage stabilizer.
  • Understand and verify the documentation about the pin connections that are required for your motherboard. I remember a person who had to put his 600W PSU for sale online because he didn't check the number of power connections his motherboard required.
  • Check for the number of SATA power connectors and molex connectors.
  • PSU's like Seasonic and NZXT come with a 16A plug, which won't fit into any 6A sockets in your room. See the pic below (the service centre said it's ok to use a 6A power cord, and online reviews say that you shouldn't use a 6A adapter with a 16A cord, since the current and wire thickness difference can cause overheating). If you will be doing a lot of high performance computing, it'd be worth hiring an electrician to install a socket which can support the 16A plug. Don't take risks with electricity.

Buying RAM

Don't be tricked by the RAM frequency shown. For DDR4 RAM, the base frequency (the frequency it runs at during normal operation) it runs at is 800-1600MHz. The effective frequency (when you enable XMP in BIOS) is 1600-3200MHz.
 

Precautions:

  • Also, be aware of RAM latency. Check the CL number printed on the RAM.
  • Make sure the motherboard you choose, supports the RAM version and frequency.   

Some RAM brands:

  • Corsair (likely a good brand. Origin: Taiwan)
  • GSkill (probably a good brand. Origin: Taiwan). They were one of the first and probably only brands to ensure Rowhammer safety.
  • Crucial (probably good, but these usually have a higher CL number, so are likely to be slower, so don't go by just the price)
RAM usually works well for very long, unless overclocked frequently. So even if you can buy second-hand RAM, it's ok.
 

Buying a processor

I used to think that Intel processors were superior, but I was wrong. AMD seems to be manufacturing better processors. When selecting a processor, it helps to make a table containing the processor price, name, speed (normal/boost), socket type, L1/L2/L3 cache sizes, wattage (base/max), cores and threads per core, launch date, maximum RAM and maximum channels. The smaller the nm of the processor, the more transistors they can fit into a chip, and the more power efficient the processor will be. If you aren't into serious gaming, it also helps to have a processor with an integrated GPU (called APU).
To understand how defective CPU's are classified, watch this video
Note: People say that you need to change the thermal paste often. That's probably a myth like how dentists say you need to visit them every 6 months.

Buying a motherboard

Search for "motherboard nomenclature", and you'll see articles mentioning what the "Prime", "TUF", "ROG" etc. portions of the board name means. For example:
MSI PRO boards are lower quality compared to MSI MAG boards. The order is as follows, with the names on the left of the less than sign being worse quality.
  • PRO < MAG < MPG < MEG.
Same way, for ASUS boards it is:
  • Prime < TUF < ROGStrix < ROG.
The names mentioned above are the board series names. Strix E is the best. Strix F is the second best. Strix G is a Micro-ATX and Strix H is ATX. With motherboards designed for Intel chips, the G means it is GPU optimized, and S means it is storage optimized.
The Z790, B650 etc. are the chipset names.
The model names are P, Gaming, ProAX, etc.

Precautions:

  • Select the right chipset which matches the processor. Motherboard manufacturers usually publish a processor compatibility list.
  • If you choose a motherboard that does not support overclocking, you don't need to select a processor that supports overclocking (unless you plan to switch the processor to a different motherboard later).
  • The boards with WiFi are generally not worth the extra money unless you will actually use WiFi and Bluetooth. The alternative is to buy a separate WiFi card when you need one.
  • Go to the official motherboard specifications page and ensure it has all features you need. These include NVMe, PCIe, onboard speaker, USB ports, display ports, LAN, audio and PS2 port if you ever need it.
  • Have a look at the number of pins required for the CPU power, and ensure that your SMPS provides it. 8 pins is the standard, but some have a second optional power connector with 4 pins for people who want to overclock.
  • Check for XMP support (also called AMP, EOCP or DOCP).
  • LED boot lights are helpful.
  • Check if the processor has integrated graphics. Also called APU for AMD processor. These are CPU's with GPU's built in. Some can be so powerful, that you won't need an extra graphics card. For example, the Ryzen 5 5600G has an APU that's equivalent to an NVIDIA GT 1030.
  • Check for warranty duration and service. 
  • Check for whether they have a history of stable BIOS updates.
  • Check for BIOS flashing and BIOS reset options. 
  • Be aware of the DPC and R terms.
  • Look through reviews and posts on forums for complaints about particular motherboards.

Customer support

This is an essential part of selecting a product. The customer service centers should ideally be in your city, else you'll have to ship it to another city. Before buying the product, it also helps to call up their customer support number or email, and ask some question to see how they answer it.
  • ASUS: Said to have good service. Their Bangalore customer support is handled by F1 Infosolutions at Cunningham road.
  • MSI: Bangalore customer service at F1 Infosolutions, Kalyan Nagar. They said they'd probably have to send the motherboard to Delhi for inspection. Their website has a page for registering the product.
  • ASRock: Bangalore customer service at Smartlink network systems, Jayanagar.
  • Coolermaster and Crucial: Bangalore customer service at Kaizen Infoserve at NR road, near Majestic. 
  • Gigabyte: Service center is in Chennai.
  • NZXT: Bangalore customer service is at Acro engineering, near Lalbagh. The service person was responsive and helpful.

Useful sites

Building the PC

  • Do not keep the motherboard on the anti-static bags. It is made of conducting material. You can however keep it on cardboard that has no print on it. 
  • When tightening or removing the screws of the cooler, remove the screws diagonal to each other first. If you remove the screws adjacent to each other, the spring action can make the cooler whip outward, possibly ripping the processor out and damaging the pins.
  • Before removing the cooler, run the CPU for a while to get it hot. This will make the thermal paste a bit more fluid.
  • It's ok to have XMP enabled for the RAM in the BIOS. But it's also necessary to run Memtest for a few passes to check if the RAM is functioning right, because if the RAM isn't at the right frequency, it'll cause the PC to crash at random points of time. Even if Memtest passes during the first pass, it can detect RAM failure during the next pass. So make sure you let it run for at least 3 passes. If it detects errors, you can go back to the BIOS and lower the RAM frequency and run Memtest again. Do this until the tests pass, and that's the stable frequency you can settle for.

HDD vs. SSD

Definitely buy an SSD instead of an HDD. If you have an old HDD, then install your operating systems on the SSD and attach the HDD as a secondary backup storage. There are options like NVME/SATA/M2 that you can consider.

DVD/BluRay writer

If buying any of these, buy one that can be connected to the PC via USB, because then it allows you to connect it to a laptop or any other computer easily.

Selecting a UPS

There's the ordinary "Online UPS", the "Line interactive UPS" and "Standby UPS". Choose carefully, based on your voltage stability needs.

Pre-built configurations

The shops selling PC parts may also have some pre-built configurations that you can choose if you don't want to go through the hassle of choosing parts. There are also plenty of PC building online forums where you can ask for advice, you can post your proposed PC configuration and ask if it's good enough. There are websites where you can check if the parts you are buying are good enough for the games you plan to play.
 

Final tips

  • Don't be in a hurry to buy. Plan it out well, and based on exactly what your needs are.
  • Buy more RAM and storage space than what you estimate you'd need. It's always worth it. 
  • Buy a large computer cabinet. It helps when you want to install a large modern graphics card even if you may install it only later. 
  • Think of what other accessories you'd want. A mousepad with good grip would be good. A computer cover isn't really necessary since it's simpler to cover the computer with a table cloth.
  • Do your research about mechanical keyboards and try buying one of those (there's a difference between the ones which internally have blue, red and brown keys). Search for the ones that have Cherry MX keys instead of the cheaper Chinese alternatives. Also look for ergonomic keyboards. If buying a membrane keyboard, the quality of Microsoft keyboards may be a lot better than others.
  • Check if you really need an extra graphics card or whether an APU (integrated GPU) is sufficient. You always have the option of buying a graphics card later if you really need it. 
  • Search for computer cabinets that may have an extra slot for inserting SD cards. Also, test every slot of the cabinet before bringing it home. Once I got a cabinet where the front mic and speaker connectors didn't work. 
  • Since dust may enter computer cabinets, there are certain kinds of filters that can prevent dust from entering. I'm not sure if it is useful. A few searches and asking around on forums can help you figure it out. 
  • Search other websites for anyone planning to sell off their computer. Some people try selling it off just because they are leaving the city, so if the person is reliable you may get a good PC and it gives you a great chance to bargain.
  • When going to places like SP road, first ask around in multiple shops for prices. The shops will generally give you a quotation for each part you want to purchase. Search online for which shops are good, and go to those shops. Going to good shops matters a lot so that you don't get cheated, and if there are any issues, the response of the shop owners matters. Decent owners will be helpful. Shady ones will tell you to get lost. I have had trouble with defective/fake items from unreliable shops.
  • Ask your friends if they also plan to buy something. First talk to the shopkeeper saying that only you plan to buy, and ask if he could give any discounts. Then ask how much more of a discount he could give if you ask your friends also to purchase from his shop. Try strategies like these to get a good bargain. Ask an AI to give you more tips.
  • At SP road, some shops do the PC assembly at the shop itself, and some of them outsource the assembly (done for free) to another shop. The other shop is usually a cramped up messy place where the assembly is done in a very amateurish way, so make sure you insist that the assembly be done at a safe place.
  • Ask the shopkeeper if there's any advantage in getting the PC assembled at their place and if there's any discount if you choose to do the assembly yourself. Also, whether they'd replace the parts then and there if found to be defective during assembly.
  • You could take the parts home and try building the PC yourself, but I'd recommend having some experienced person guide you. 
  • It's always better to buy a PC instead of a laptop, because you get much more performance for the money you spend. If mobility really matters, it's usually better to spend lesser to buy a tablet or one of those tiny laptops which have no fan requirement. Any heavy processing can be done on the cloud. 
  • Go to the shop well prepared, and with all necessary technical terms in your mind. If people see that you don't know your stuff, they are more likely to charge higher or trick you. 
 
Remember: When you pay for something you have the right to get it done the way you want.
 
All the best with building your PC!!!

05 April 2023

How volunteering should be done

Many years ago, I led a team of volunteers for what is usually called a CSR activity, but in our case it was just called Employee Volunteering, or Community Relations.

I noticed a trend among corporates and employees, to volunteer for social causes without really caring about improving the situation of the people they purported to help. Everyone just wanted to show that they were helping. The photos and entertainment was more important than empathy, caring and finding solutions.

I also noticed a pattern of people being forced to volunteer and then not wanting to return back to volunteering at all. Almost eight years ago, I had created this infographic to illustrate the problem to my seniors.

How volunteering is done by many

If you point out a problem, you should also offer a solution. So the next infographic shows one solution.

A better way to volunteer

A crucial part of the "better way", is the mentoring phase. Volunteers first need to be taught how to volunteer. In every sector, there are experts who know what the key problems are and how it needs to be addressed. They need your help, and they need it in specific ways. Don't use it as a chance to entertain your employees. Use it as a chance to actually help. It may be boring to do meaningful volunteering. But that's what really helps. 

The Nav test can provide some more guidance.

05 March 2023

IISC Open Day 2023

The previous Open Day was at the end of February 2020, when Covid cases had just begun surging. After all these years, Open Day was back again to enthrall scientific minds! The great thing about a science crowd is that everybody is well behaved and organized. Even the human-trains of school kids that snaked their way through everywhere, were organized and well behaved. 

Here's a video of some of the interesting exhibits:

Although IISc put up a map of the place, and it had a grid to help figure out where we were, the map turned out to be useless, since when people photographed it and ventured to other parts of the campus, referring the map ended up making them confused. We really need a better, more responsive map that recognizes locations and perhaps even helps us plan out our path of visiting exhibits and provides info on the transport vehicles.

Click to view it larger

Neural network meant for physics-specific calculations

An autoencoder that compresses data and de-compresses it with some loss

A catapult without the conventional friction joints

A robot-fish fin showing how turbulence is created in water and propels the fish forward

An anti-gravity structure that pulls the string in various directions and can even support a load

A demonstration of immiscibility of fluids of various densities

Drones display and demo


Silicon chip manufacture


You can move the arms of the robot on the left, and it'll copy the same motion on a robot placed in another room. It vibrates to let you know you have reached a boundary. Useful in robotic surgeries done remotely

An Augmented Reality gun which you can use to play a game

A circuit that calculates using analog signals instead of digital. Meant to mimic the human neurons. It performs calculations with much lower power than digital processors.

A circuit assisted with quantum computing

Tiny ML for use in ecological conservation and gesture recognition

Industrial control systems and security

Seeds encased in manure and mud, forming a ball which can be thrown in areas that need aforestation

A travelling salesman game

Ice cream made from milk cream, milk, vanilla essence and frozen with liquid nitrogen. They give you samples to taste, and it's delicious!

Flexible solar panels

Toys that make learning mathematics fun

Rainwater harvesting model

Tender coconuts at an outrageous price of Rs.40

A bus driving simulator you can try. The simulator is actually used to train BMTC drivers to handle Indian roads. Surprisingly, there were no potholes on the road. So much for trying to simulate "Indian" roads.

A toll-gate game where they design the game to see if you choose to use the toll and then switch to a non-toll road and then switch back to the toll road based on traffic. This game had a lottery for players, based on how often they used the toll road.

A traffic junction game where you control the signals. The player who reaches the highest level wins a pen

Robot football

A robot kit for children to create their own robots

The high voltage lab setup

Testing aircraft for lightning strikes

More on the lightning strikes

The demos shown at the high voltage lab. The queue is quite large here

The brain research centre

If you ever wondered how many idlis you need. Apparently, idlis contain protein too.

Click to view bigger

Explanation of flash floods


Hydrogen fuel cell powering a toy train

Tactile robot arms
Some people travelled all the way from Kerala just for Open Day

What's shown here is a minuscule subset of the massive number of exhibits and interactive games that IISc had organized. Kids can win chocolates and prizes too in the games organized. One day isn't enough to go through all the exhibits. There are so many.

Parking is available at IISc Gymkhana ground for free. However, be prepared to end up with a dusty vehicle, and if you don't find a shady area, your vehicle gets baked in the afternoon sun.

Each of the departments have toilets that you can use. There are plenty of food stalls available, but it's better if you bring sandwiches on your own, since the stalls are overpriced. There are plenty of places on the lush green campus where you can sit and relax. Everyone is helpful.


04 February 2023

Real path to linked files

In Ubuntu, when you click on a link to a folder and reach that folder via Nautilus, you are only shown the path you came from, rather than the actual path of the folder or file. 

For example, it'd be:

/media/nav/Link_to_folder/folderOrFile

However, the actual path of the file would be:

/media/nav/Transcend_NTFS/NavData/backup/folderOrFile

Even if you open a terminal in the linked folder, a pwd command would still show you only the linked path, rather than the actual path.

To view the actual path, simply use:

realpath fileOrFolderName

15 January 2023

Comparing video quality by viewing videos side by side

When you convert videos to a different quality, you'd want to compare them. While there are objective methods of comparing it, the subjective evaluation by a human is generally more accurate. When looking for solutions, I found a brilliant solution named Vivict. It not only allows you to compare streaming videos, it also allows you to compare local videos, by using the little white icon near the address bar. The best part of Vivict, is that it shows half of one video and half of another, and allows you to move the mouse to view more or less of the video.

Limitation of Vivict: It does not support all video file formats. When I wanted to play an mkv file, it didn't work.

Another solution, is to simply use ffplay like this:

ffplay -f lavfi "movie=leftVideo.mp4,scale=iw/2:ih[v0];movie=rightVideo.mp4,scale=iw/2:ih[v1];[v0][v1]hstack"

Comparing videos using ffplay

A simpler solution:

I created a program (https://github.com/nav9/splitVideoQualityViewer) similar to Vivict which shows the videos like this:


 

Feel free to either fork and modify the repository or contact me on the repository's discussion tab, to collaborate.



Say thank you or donate

01 January 2023

Automatically detecting audio video async and correcting it

It's a bit disorienting when in you see a lack of sync in the lip movement of a person and the audio. There are various reasons this can happen. If on a live stream, it could be because of network congestion or because the program doing the video encoding didn't get enough of CPU cycles. It can also happen when re-encoding video or splitting it.

Whether you want to measure how much of an async there is or even to fix it, machine learning has thankfully come to our aid. I created a simplistic open source program that finds periods of time when a person begins to speak after a silence, and matches it with audio to find out how much of an async there is, and then I use FFMPEG to fix the async.  

Code: https://github.com/nav9/audio_video_synchronizer

MediaPipe was used to identify the lip movements. I was surprised at how robust it is. Even if the person's face is turned sideways, it still tracks and estimates the face point positions as x,y,z points. Almost 400 points are tracked.

To identify human speech in the audio, I used a voice activity detection algorithm.

There's a lot more work to be done to make this program generic. Ideally, a Recurrent Neural Network (perhaps even LSTM) could be used to analyze lip movements temporally and figure out which lip movements are actually speech and which aren't. Then a probability score needs to be generated based on the actual sounds detected and matched with the lip movements. There are pre-trained models like Vosk, which can be used offline to estimate which words are spoken. Python's speech_recognition package comes in handy here.


07 December 2022

Add shutdown and reboot menu options to GRUB

I have ALWAYS wished for this, and can't believe it was only now that a lightbulb lit up in my head. There are plenty of times you'd be at the GRUB (Grand Unified Bootloader) menu, and wish you could simply shutdown from right there, instead of pressing the power button or booting into the operating system and then shutting down. 

This should have been a default option in GRUB. Anyway, here's how you add it:

I saw this technique here, and this is why I like Linux more than Windows or Mac. There are tons of things you can customize.


This file allows you to add custom menu options to GRUB:

 sudo gedit /etc/grub.d/40_custom

Add these options to the end of the file, save and exit:

menuentry "Reboot" {
      reboot
}

menuentry "Shut Down" {
      halt
}

Update GRUB:

sudo update-grub

Reboot the computer.