30 March 2019

We use cookies. We use cookies. Accept/Decline. Hey! Stop that please!

While it's great that the GDPR regulations were created and the privacy of Users is now taken a wee bit more seriously, it gave rise to a poorly conceived idea of displaying notifications about cookies on websites.

Visit almost any website and you are shown a message that's meaningless to most Users. "We use cookies. Accept/Decline". For most Users, the reaction is "Uh...ok...what does this mean anyway?".


In the same way that popup's and ad's annoyed Users, now we have a perfectly legal regulation that created new popups that take up screen space.

Why should you be concerned?
Because some websites can access already-stored information to get to know more about you. According to Directive 2009/136/EC, Article 5(3):
"Member States shall ensure that the storing of information, or the gaining of access to information already stored, in the terminal equipment of a subscriber or user is only allowed on condition that the subscriber or user concerned has given his or her consent..." 

More explanations here.
There was a P3P protocol idea floated long ago, but it didn't come through.

From a User eXperience point of view, people are annoyed with the banner, and would prefer to have an alternative.
So today I made it a point to give a feedback to Firefox and Chrome to provide a notification icon similar to the green HTTPS icon on the addressbar. If the User is concerned about cookies, they can click the icon to clear the cookies or revoke the website's privileges, instead of having to always click on an accept/decline button that takes up screen space on every single visit.
This isn't really a decision for a browser team to take, but perhaps it would be possible for them to convince website owners to put up metadata on their website that allows the browser to know that it needs to display an icon on the addressbar. Or perhaps if the browser detects the notification popup, then instead of displaying the popup, it could substitute the popup with the notification icon on the addressbar.

25 March 2019

Which IDE to choose for Python?

If you have a computer with a minimum of 4GB (but recommended 8GB) RAM, go for PyCharm (but I didn't like the interface much, so I'd still recommend LiClipse).

For those who don't want to upgrade their RAM so soon, the next best option is either LiClipse or VS Code
LiClipse is a light-weight version of Eclipse that has PyDev pre-installed. So no hassles of a separate PyDev installation. I recommend LiClipse is because of refactoring and autocomplete, but it has the same bloated, unintuitive, annoying interface of Eclipse where you have to spend an eternity searching the IDE for commonly used functionalities. 
If you dislike Eclipse, try VS Code. One advantage of VS Code is that it does not force you to have only one entry-point for your code. You can open any file in a project and run it. I did find it slightly more annoying to use, compared to LiClipse. Moreover, on someone else's laptop, even though it had 32GB RAM, a 1TB SSD, an i7 Intel processor with 12 cores and an NVidia gaming graphics card, VS Code's IDE performed so slowly that I decided to switch back to LiClipse. Pressing Ctrl+Spacebar to auto-complete variable names would take more than 15 to 20 seconds. Renaming all instances of a local variable in a 50 line function would take more than half a minute. This was probably due to the project having many files, but the algorithms used in VS Code are massively sub-optimal.
 
Back to LiClipse. I'm not an Eclipse fan, and was rather amused and almost nodding my head in agreement when I read Jason Fruit's review which said "Full disclosure: the word "Eclipse" in a programming context (or a literary one, for that matter) fills me with dread; in my mind, Eclipse is a pig strapped to a dog strapped to a whale. I'm reluctant to install Eclipse because it's such a large application; some would say bloated".


Other IDE's
  • I first tried IDLE and didn't like it because it didn't have a good number of IDE capabilities.
  • Then tried Netbeans (which I have a good amount of respect for), but the Python plugin for Netbeans didn't support autocomplete and refactoring.
  • This made me switch to Spyder, which had a nice UI, dark theme and autocomplete features, but no refactoring. I was also surprised they needed to create an entirely separate Spyder3 IDE too.
  • WingIDE supports refactoring only in the paid version. 
  • There's Komodo IDE which might be good but I didn't look into because it has a paid version and I was quite sure many features would be disabled in the free version. 
  • Eric IDE already had some poor reviews, so didn't bother with it. I personally didn't like the look of the IDE either. 
  • Sublime Text was surprisingly un-intuitive. Given its popularity, I guess it's just me that is unfamiliar with the capabilities of the IDE.

Finally found out that LiClipse existed, and after the annoying run configuration settings, I'm actually liking it. Especially because of the refactoring support. LiClipse does still have bugs with its graphics and menu's, but it wasn't too annoying.


Putting LiClipse into the Ubuntu start menu:

In the terminal, run the command:
sudo -H gedit /usr/share/applications/LiClipse.desktop
Alternatively, if you don't want to give it sudo permissions, you can install it only for the local user by using:
gedit ~/.local/share/applications/LiClipse.desktop

In the file, paste the following:
[Desktop Entry]
Version=1.0
Name=LiClipse
Comment=Lightweight Eclipse
GenericName=IDE
Keywords=IDE, PyDev, Eclipse, LiClipse
Exec=/home/nav/liclipse/LiClipse %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/nav/liclipse/icon.xpm
Categories=GNOME;GTK;
StartupNotify=true

The desktop entry specification is here. Make sure you modify the file paths (shown in green) in the above code. The "%u" is so the desktop manager knows what to do if you open multiple selected objects at the same time or drop one or more objects on it. It's not really necessary.

That's it. Save and exit and you'll see LiClipse in the start menu.


16 March 2019

An impressive display of group projects at Ramaiah University of Applied Sciences

February 2019 saw a rather impressive display of technology and knowledge by the full-time students of the 2017 batch of Ramaiah University of Applied Sciences.
I went to the exhibition at the Dwaraka auditorium expecting to see some simple projects by the technical teams, but was surprised to see the dental, MBA, pharma students, product design students and many more batches presenting their projects.

Here are some of them:

Meant to be a flying machine
Pothole counter using ultrasonic and image sensors

Wind tunnel to check forces on bridge


Building work completion tracker
Water filter

Component sorter

Another component sorter
A low energy EV motor (as I remember)


A blood glucose checker using IR

Helping satellites communicate using laser
Device that uses touch, sound and visual inputs to help people communicate with the visually impaired and the hearing impaired

Cricket player performance predictor based on past data
Software tool to select the best model for a particular algorithm, using residual errors

Convolutional Neural Network to identify scenery and concoct a story based on it
Some capabilities of the techno center

Study on organ donation awareness in Bangalore

IR robot to pick up difficult-to-locate dental tools fallen on floor


Assessment of impacted third molars

Restraining seat design for children
Good brushing habits teaching aid for visually impaired children

Study on leveraging e-commerce for farming

Skill India impact assessment

Study on effectiveness of water kiosks in Bangalore
 
Study on opportunities for the transgender population

An electric vehicle

Crowd structure interaction on pedestrian bridge

Modern design for an old bike model

Foldable stall design
Mechanized coconut husk remover

Automatic vehicle classification for highway monitoring
Blade guard to safely load and unload surgical scalpel

Directly compressible excepients for drug delivery
Mandibular retractor and fracture reduction forceps

Piezoelectric transducers to generate electricity from treadmill
Semi-automatic plastering machine
IoT based headcount monitoring system for buildings
Single row paddy reaper

 What was surprising was that projects were interdisciplinary. The dental students were creating robots, the civil engineering students were doing image processing, electronics students were using machine learning to assess models. The blade-guard innovator even applied for a patent.