LATEST POSTS

Coverage Problem in Mobile Robotics

Visual SLAM - An Introduction

Simulataneous Localization and Mapping - An Introduction

Motion Planning in Robotics

Sampling-based Motion Planning



TIL Series - Computer Programming


I realized that either at work or while surfing the internet; I come across something trending or something I never knew about in the tech-industry. I curiously read about it or use it if needed and then move on and unfortunately forget it over time.

Finally, I decided to create a space where I journal my learnings, as frequently as possible. This "Today I learned" series is a very raw brain-dump write-up (no glorification, please!) of these learnings, largely to ensure that I record things that I come across.

Because this might have tons of stuff from different sub sections of Computer Programming, I might sort them out later and organize categories better - One Day!




cron jobs (December 9, 2019)

A cron job is a sofware utility to schedule tasks by the clock and save repetitive manual runs. Cron jobs can be used to setup shell scripts or commands for system maintenance, data handling, emails, automated cache handling and many more mundane tasks.

A crontab is a special cron file with all commands and jobs and related instructions to be automated. A cron daemon is only started at boot and usually never automatically restarted thereafter.

crontab -e is the command used to edit the crontab configuration file. It provides standard options for scheduling the job by the minute, hour, day, month and day of the week. The cron job configuration also needs the exact command to be executed

This command runs the user-defined shell script at the beginning of each hour and could be as simple as setting a reminder to drink water!
0 * * * * /home/cron_job_script/execute.sh

friend in C++ (November 18, 2019)

A friend class in C++ can access the private and protected member variables of a different class. The friend class just needs to be declared in the concerned different class. Similarly, a friend method in C++ can access either protected/private methods or even global methods and use them within the class they are declared in.

A friend can be declared as private or protected or public in the class while the behavior remains unaffected. Friend behavior is neither mutual nor can be inherited. It only establishes access from the class declared in to the class being declared.

However, friend methods or variables should not be used extensively unless necessary as it defies the purpose of encapsulation in OOP. At the same time, it limits the extent of interaction permitted between two classes.

Declarations:
friend class Alpha;
friend int Alpha::search();

dpkg (November 17, 2019)

dpkg is a package manager for Debian-based systems(Linux-based open source softwares). It is a low level tool which can only install and uninstall packages asked explicitly. It is not intelligent enough to run automatic updates or manage dependencies. dpkg is very simple to use and useful for terminal based interaction with packages. Advanced Package Tool( apt) is the command line tool that uses dpkg as the backend. It is advanced in the sense that it can find the dependencies of the package being installed and uses dpkg to install them automatically, as well.

The -i argument is used to install packages, either from compressed zip files or .deb
For example: dpkg -i <software.>deb

The Ubuntu Help Website provides very comprehensive information about dpkg and more command line options can be looked up using man dpkg command.

IF YOU LIKED THE ARTICLE, DON'T FORGET TO LEAVE A REACTION OR A COMMENT!


Copyright @Akshay Kumar | Last Updated on 05/25/2019

counter